Saturday, October 30, 2010

Backed up and Updated Chumby microSD

The wife is out to get her hair done and I am here trying to get the Chumby drives backed up. I was referencing the excellent article by Bob Smith, "Control a Robot using a Chumby." So here are the things that I was doing:

(1) Power off, popped the back off of the Chumby One, removed the bottom, and removed the microSD from it's slot. Put the microSD into the reader on the Ubuntu Laptop and executed the following:

cd ~/Documents
mkdir OldChumbySDs
cd OldChumbySDs
sudo fdisk -l /dev/sde
sudo dd if=/dev/sde of=Chumby_Disk_101030_0.img

The fdisk identifies the partitions from the Chumby microSD and the dd command will make an image of the entire disk in the OldChumbySDs directory. The /dev/sde may vary from one computer to another. The fdisk command returned the following:

Disk /dev/sde: 3965 MB, 3965190144 bytes
5 heads, 4 sectors/track, 387225 cylinders
Units = cylinders of 20 * 512 = 10240 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sde1 1 14670 146697+ 53 OnTrack DM6 Aux3
/dev/sde2 1563 14063 125000+ 83 Linux
/dev/sde3 14063 26563 125000+ 83 Linux
/dev/sde4 26563 99073 725092 5 Extended
/dev/sde5 26564 39063 124998+ 83 Linux
/dev/sde6 39064 99073 600089+ 83 Linux

I am not really sure about the Id 53 here but I will take their word for it. Since I am interested in making the partitions a little bigger, I chose to also execute the following:

sudo dd if=/dev/sde1 of=Chumby_Disk_101030_1.img
sudo dd if=/dev/sde2 of=Chumby_Disk_101030_2.img
sudo dd if=/dev/sde3 of=Chumby_Disk_101030_3.img
sudo dd if=/dev/sde5 of=Chumby_Disk_101030_5.img
sudo dd if=/dev/sde6 of=Chumby_Disk_101030_6.img

Now I have a copy of each of the partitions on the microSD. I also find it interesting that the last update I did of the microSD, when I copied over from the original microSD in the Chumby did not take up the whole 4GB of the card. So I did something wrong the last time around.
(2) Now that I have a backup in place, I put a 4GB microSD into the drive and proceeded to update and make new partitions by using fdisk in the command line mode. This was necessary to get partition 1 to be type 0x53. Then I executed the following commands to copy the partition information:

sudo dd if=Chumby_Disk_101030_1.img of=/dev/sde1
sudo dd if=Chumby_Disk_101030_2.img of=/dev/sde2
sudo dd if=Chumby_Disk_101030_3.img of=/dev/sde3
sudo dd if=Chumby_Disk_101030_5.img of=/dev/sde5
sudo dd if=Chumby_Disk_101030_6.img of=/dev/sde6
sudo e2fsck -f /dev/sde2
sudo resize2fs /dev/sde2
sudo e2fsck -f /dev/sde3
sudo resize2fs /dev/sde3
sudo e2fsck -f /dev/sde5
sudo resize2fs /dev/sde5
sudo e2fsck -f /dev/sde6
sudo resize2fs /dev/sde6

What the previous e2fsck and resize2fs commands do is first check the file system on the partition (e2fsck)and then maximize it to the size of the partition (resize2fs). Seems to work correctly.
(3) put the new microSD card back into the Chumby and fired it up. It proceeded to work just like a Chumby, so first part of mission accomplished - I got the partitions to be larger on a new microSD. The sshd, access port, and ethernet connections work correctly.

Wednesday, October 27, 2010

Got Access Port and Ethernet working from Chumby

This evening I added a USB to Ethernet adapter and reset the control panel to interface through it. I was surprised that the ethernet connection showed up because I thought that I might have trouble with the type of cable. I used a cheap ($34.99), generic USB to Ethernet adapter [Intellinet 503686 Hi-speed USB 2.0 to Fast Ethernet Adapter] and it seemed to work just fine. I also re-added the /psp/start_ap file and rebooted and the access port came up just fine. So now I have another access port to play around with. In this case, I wanted the access port because I need it to play point of contact for my robot.

I have the Ethernet adapter plugged into the non-powered USB hub along with the lifecam camera. Now I need to search for a driver to allow the camera to work with the Chumby in preparation for porting the ROS.

The Ethernet address chosen by my home system is 192.168.0.135 and the wi-fi access port address is 10.0.50.1, which is probably a default. I noted from a check of what daemons were running that a dhcp server is also running. When I connected to the AP via my laptop it gave me an ip address of 10.0.50.199, again probably a default. Everything works much as an AP would, I was able to get to the internet through firefox and other programs. I was also able to go into the SSH server at 10.0.50.1, so I am pretty much assured that it works correctly. The dhcp server appears to be udhcpc. On my laptop the resolv.conf has a nameserver address of 10.0.50.1 and the Chumby shows my home nameserver and Domain name. I gotta hand it to the Chumby guys, they did a nice job with this.

Getting some video from my lifecam might be a bit of a trip though. I did determine that a USB drive would post and come up mounted correctly. I put a USB drive into the hub and it came up as /dev/sda1 and mounted as /mnt/usb-0000-0484. I then recompiled the lighttpd web server to the usb drive. I followed the commands at Chumby_as_a_web_server. Since I had gone through the process once before, I knew that it would come out correct. I now have a web server that I will test on another night.

Sunday, October 24, 2010

Mod to Chumby for SSH Server and Access Port

This evening I tried to modify the Chumby a little by adding a capability to run the ssh server and make it into a access point normally. The Chumby has a few easter eggs to allow it to do some cool things. To launch the ssh server on a normal basis you simply make a file called start_sshd in the /psp directory:

touch /psp/start_sshd

this will cause the Chumby to launch its sshd server each time that it boots up. In order to setup the access point you make an additional file called start_ap in the /psp directory:

touch /psp/start_ap
reboot

To stop each one of these, you remove the files and reboot. The access point did not come up so I removed the launch file for it. I need to revisit and make the output go into a ethernet port.

Thursday, October 21, 2010

I didn't realize how big that ROS was

I am in the process of updating my Ubuntu Laptop at work.  Part of that process is to update the files on my system that need updating.  There were a number of the Robot Operating System (ROS) files that needed updating as well.  I was wondering why it was taking so long for the update to complete when I looked at the listing and noticed that most of the ROS files were large.  For instance:

(1) ros-cturtle-point-cloud-perception is 56.5 MB
(2) ros-ctrutle-visualization is 44.5 MB
(3) ros-cturtle-navigation is 9.5 MB
(4) ros-cturtle-laser-pipeline is 6.7 MB (probably will never be used)
(5) ros-cturtle-visualization-tutorials is 308K (not a problem)
(6) ros-cturtle-simulator-gazebo is 146 MB (will never be loaded onto the Chumby)

Given some of these sizes that are reported, I can see why people have been having problems putting the ROS package onto an embedded system.  I am however going to take the tack of shoehorning the code onto the Chumby as best I can and try and figure out what parts will be missing after I get the initial set online.  If the packages are too big, I will end up having to abandon ROS and go to something smaller.  At the moment, since I know that ROS has been put on the Beagle Board and the Gum Stick I have faith that I will be able to add it to the Chumby mix.  I really need to test this out over the weekend.

Monday, October 18, 2010

Added wrist rotate to robotic arm proto 2

Pictures_100708_01 001
Over the weekend, I had a chance to modify the Robotic Arm Prototype and add a wrist rotation servo and accompanying gears.  I also shortened the forearm part of the robotic arm to take some of the stress off of the elbow servo.  In addition, I changed out the shoulder servo to a higher torque model to help with the stability of the robot.  Unfortunately, due to many things that I had to get done over the weekend, I did not have time to check out the functioning of the arm with the Laptop and SSC-32.  I really need to check out the moment arm equations to see if the servo torque values are correct for this Prototype version 2.  Maybe I will have time to do that tonight after work.

Thursday, October 14, 2010

Another day of not working on the robot

Today was the second class in my pursuit of a CISSP certification. It was all I could do to get my work done and then get home in enough time to change clothes, eat, and sit down in front of the computer for the class. I did think a lot about what I should be doing, but I did not accomplish much. Most days are going to be that way, I am afraid. I think that some of my original plans to explore the robotic arm and a pan/tilt camera control were essentially good ideas, I just need more time to get them accomplished. Hopefully this weekend will be different and I will be able to push harder. The plans for this weekend include more testing of connections between the Laptop and the servos that need controlling, finish the 2nd prototype of the robotic arm, change out the 4GB microSD chip in the Chumby and start attempting to get ROS installed. I need to concentrate on getting the Chumby to control some of the servos and at least some of the sensors. I am hoping there will be enough horsepower in the Chumby to accomplish these things. If not, I will be spending even more money to figure out a solution. All this without completely knowing what the KIPR Open ruleset entails.

The KIPR Open announcement appears to be getting closer

Well boys and girls, there were two changes to the KIPR Open announcement pages this morning.  The page at http://www.botball.org/kipr_open changed to say that it was imminent and it then points to the page at http://kipr.org/kipr_open to announce the game.  Can't wait to see what they have come up with.

Wednesday, October 13, 2010

Some test done over the weekend

I was rather busy this weekend and although I had my grandson with me I did not get into any robotics with him.  It wasn't until Columbus Day that I had a chance to work on the robot.  I did manage to test out some of the parts.  I removed the long arm on the robotic arm, leaving the base and elbow portions.  With that I had a total of three servos to try out the SSC-32 servo control from the Ubuntu Laptop.  I used the battery setup that I had made for the Pololu and connected it to the SSC-32 for power through two pins that I scavenged from an old modem printed circuit card.  By putting a serial terminal on the laptop and setting it up for 115K I was able to send serial commands to the SSC-32 to control each of the three servos.  That is when I realized that there was a bit more to changing the pulse width than I had thought.  The SSC-32 is capable of adding offsets to get the alignment of the servos correct.  Originally I had set the robotic arm up to have essentially 90 degree angles to deal with.  However, the weight of the long part of the arm caused the servos to dip by themselves.  Yesterday I had a package arrive from Lynxmotion which contained a set of gears to turn the claw plus or minus 90 degrees and some shorter aluminum tubes so that the moment arm would not be so great on the robotic arm.  I perhaps will have to invest in some stronger servos and different clamps in order to get the robotic arm to be more robust.  For right now, I just want to be able to play around with the concept.  I also was able to purchase another servo over the weekend to use with the webcam in order to form a pan/tilt unit.  I will work on the pan/tilt unit tonight.  My goal is to get some image processing up and running using the pan/tilt unit to move the webcam towards a specific colored object.  This is one of the experiments that I want to accomplish in preparation for the KIPR Open since I know that color will be a deciding factor.

WT Woodson Robotics Club not meeting today

I will not have a chance to get to the Robotics Club today, the PSATs are being given at the school and they take precedence.  I was partially prepared to talk more to some of the seniors about the KIPR Open competition, but now this break will give me some more time.

Wednesday, October 6, 2010

Met with the WT Woodson Robotics Club Today

I had my first meeting with the WT Woodson Robotics Club today. I was not able to get to the kick off or to last week's demo due to work commitments. I mostly went around looking at the electronics lab and robotics lab setups. The gang were busy building robots as an exercise. The teacher let me know that the club would be participating in a robotic exercise starting in November, so the amount of activity in the club has increased dramatically. I overheard that there are about three times the number of students signed up than there were last year. That is a great achievement and reflects greatly on the students that were in the club last year getting the word out. I got to meet a few of them and was able to talk about some of my ideas for the KIPR Open. I let the teacher know that I had the okay to come and help on Wednesdays. Most of the other days I am tied up doing one thing or another at work and I now have classes on Tuesdays and Thursdays until the end of the year.

I have a feeling that I will not be shy of students that want to help with the robots for the KIPR Open this year. So, I am committed to getting everyone involved as soon as I know what the challenge is. That should be arriving next week and will give me a chance to study tactics before I meet with the group. I am hoping that I will be able to contribute as much as I can to help with everyones interest in robotics. It looks like it is going to be an interesting year.

Tuesday, October 5, 2010

A Gracious Post from Steve on the KIPR Open

Many thanks to Steve for letting me know that the KIPR Open ruleset should be available in mid-October. That is great news! Now I have to rally the troops at home to be ready to figure this thing out. Ok, I'm stoked. Of course, when I see how difficult it really is I might change my mind but right now I am looking forward to it.

Sunday, October 3, 2010

Almost Completed the 1st Prototype Arm

Robot Arm Closeup

I was able to get the first prototype of the Robotic Arm almost put together. This is a five DOF arm and I believe that the arm is a little too heavy to work correctly, even with the offset springs. I will try this out again this week and in the mean time, I will order other parts to make the forearm shorter to keep the servos from drooping. I just want to try it out for size and usage. Thereafter, I will be converting the arm to something more useful as soon as I see the new ruleset.

Friday, October 1, 2010

Test Architecture is Starting to Take Shape

I am currently interested in getting the test architecture setup to the initial robot design.  Right now I have settled on an interface over wi-fi between the Ubuntu Laptop and the Chumby.  The Chumby will be the interface to the iRobot Create, the robotic arm/servos, the light sensors, the single line detectors, the IR Optical Range Finder, and the webcam.  I need to make sure that the Chumby will both connect and communicate with the Ubuntu Laptop.  The first step is therefore to ensure that all of the interfaces via the USB work correctly.  I will do that with testing on the Ubuntu Laptop via Ubuntu and then via ROS.  The next step is to get ROS working on the Chumby and ensure that the Ubuntu Laptop and the Chumby communicate via ROS.  I will then move the ROS routines for interfacing to the sensors to the Chumby and attempt a checkout there.  That will be followed by interfacing to the sensors through a user interface on the Ubuntu Laptop then through ROS through wi-fi to the Chumby through ROS to the sensors.

This setup will allow me to make major adjustments to the programming on the Ubuntu Laptop and then check it out with the ROS connection.  As the programming portions become more mature I will port them to the Chumby, eventually having all of the routines on the Chumby.  This will also prove to me that I can interface between different robots via ROS.