Skip to main content

Posts

Featured Post

Product Design of a 4 wheel differential drive robot

A Multilayer Neural Network Based Obstacle Avoiding Robot | ROS | Simulation

This is an obstacle avoiding robot which I and Sooraj Krishna built in ROS using STDR simulator. The robot is making decision based on a 3 layer Neural Network. The learning algorithm used is back-propagation (which we wrote in python). The network design is shown below. The 4 inputs are distances from sonar sensors placed on the Robot. The two outputs are linear velocity on x -axis and angular velocity on z-axis. The Neural Network is first trained using the data captured from joystick controlling the simulated Robot. Then the  trained weights are used in the NN for controlling the Robot. This is the first version that is trained with small training set. The video is showing the Robot avoiding obstacles on its own. This is after a bit more training. NB: The video is playing a bit more faster than the actual simulation as you can see from the time showing in simulator. NB: Among two outputs one is for angular velocity. For turning right the value will be posit...

Controlling turtlesim using a Gamepad | ROS

This is a sample program I wrote to learn ROS. I have used linux joystick api to directly capture values of the analog stick of my joystick (F710 Wireless Gamepad). These data are then directly send to the turtlesim/cmd_velocity as a geometry_msgs/Twist type. NB: There are ready to use ROS packages available to capture joystick key events (which are easy to implement). This is to just start coding with ROS.

Clap Switch

For some time I was thinking of making a simple clap switch for my room. ( Kind of lazy to go and switch off the light and fan every time... :-) ) First get it work on a breadboard. "Circuit is simple and straight way. Feed the output from the mic to a comparator. The output of comparator will act as the trigger for micro-controller. Micro-controller detects the pattern and enable the corresponding relay switch. Micro-controller always waits for an interrupt (a clap). If a clap is detected it will wait and counts the following claps within a period of 1s. It will discard miss claps and only takes into account the pattern that is programmed. 2 claps means light on/off & 3 claps means fan on/off. There will be separate switch to enable/disable the clap circuit and precedence will be given for the physical switch. That means if the physical switch is on regardless of the relay state light/fan will be ON. If it's not then it will depend on the clap circuit." Co...

Vision Based Line Follower using opencv

The robot is powered by beagleboneblack using a 1500mAh Li Ion Battery with a differential drive mechanism.

Best tutorial for BeagleBoneBlack

For a long time I was searching for a good tutorial for BeagleBoneBlack. Since the community is little less for the BBB it was a little hard to get started. But I found a book which is very useful to get started (in my opinion). {every book is unique in its on way}. "Exploring BeagleBone Tools and Techniques for Building with Embedded Linux" by Derek Molloy. Here is link to his homepage where he listed almost all contents in the text. The book cover almost every basics you need to know to get started. (BBB, Electronics, Linux, Cross compilation, Git, Opencv, ...) Most of the other books and tutorials focus on the javascript tool (node). But I didn't feel so good with it. This book mainly focus programming the BBB using c which I feel good. You will find an e-book here .

Reading and showing images using opencv

Here is a sample code to read and show an image after converting it into grey scale. Program reads a picture file called boy.jpg in the current folder and displays it. After 1 second it will change to grey scale. Use this command to compile the program. g++ first.cpp `pkg-config --cflags opencv` `pkg-config --libs opencv` where first.cpp is the file name.

Mobile Robot controlling using BeagleBone Black

Finally start working properly. Need a better voltage regulator and a better battery pack! Voltage spikes when BeagleBoneBlack starts. After a while the BBB will shutdown due to voltage fluctuations... :-( WiFi module in BBB is drawing so much current . Now the robot can be controlled wireless and can move forward, backward, left and right using keyboard. Need much more work... :-) NB: Voltage issue resolved using LM2596 DC-DC Buck Converter. I have included a camera and a light source for the robot. But its not connected in the video. A laptop battery is placed at the rear end of the robot. It's not the power source. It is just added for giving enough weight to avoid skidding. Otherwise it will drift a lot. NB: There was a problem with wireless connection. It will drop at odd times. Solved using a script that will reconnect if connection is lost.