Before you start reading about v2 let me mention that Routerbot v3 is on the way and the first video about it is already available (it is called “the most hacked router in the world ever”).
After a long timeout (sorry, too much work at my primary job) v2 is finally here. It answers number of questions asked after v1, such as AP mode (so you can run it outside your home network), web camera support, web interface, using existing openwrt-based operating systems as routerbot OS and more. The new image and patch (for those already running their own routerbots) are provided in this post.
In the new version the web interface is made the primary way to operate routerbot. Command line mode is not forgotten either, just using web browser is an easier way to see the world with your robot’s eyes. Below you can see the snapshots of the web interface. I recently got one of those tiny netbooks, so the entire interface is now optimized for 1024×600 resolution.
The first snapshot demonstrates the “roaming” mode of operation. From this screen you can command your robot and direct it wherever you need. Also you can see what a webcamera sees, turn on/off lights (so you can explore dark matters), and point the camera to the objects you’re most interested about (the multimeter reading in this case). The camera is controlled using field of view matrix so you can quickly reposition camera to any point. The checkbox below the web camera view when checked makes all commands you issue in roaming mode being copied to the next screen related to programming mode.
In the programming mode you can use any of the available 20+ commands to control robot in batch mode + all power of shell scripting language. You can enter any sequence of commands in the textarea mix it with shell flow control operators, save into one of 5 memory slots and run it. I particularly recommend trying program #4 that turns your routerbot into an explorer. It uses the rangefinder to detect obstacles and avoid them.
The next screen is settings. I made it as simple as possible, so you don’t have to mess with too many network settings. The main feature is the “Access point” mode which is made default now. In this mode the routerbot works as an access point so you can use any computer equipped with a wifi card to connect to it anywhere you want. Just specify the SSID and the wep key, hit configure and in 15 minutes you’re ready to go. The default SSID is “Routerbot” and the web key is “01234567890123456789012345″. The standalone mode is the one from v1. In this mode the routerbot connects to your local wifi network. Again, specify the SSID and wepkey of your local network and hit configure. WARNING! I don’t have my own wep network for now, so this mode is not tested. It should work, but … Finally there is “Disable wireless” mode that turns the wifi off completely. In this case you can only access the routerbot using serial console (if you added one) or 192.168.1.235 IP address via cable connected to port LAN 1. BTW, if you have a web camera you have to connect it to port 4 only and configure to obtain the IP address from DHCP. Alternatively you need to add routerbotcam DNS entry and point it to 192.168.1.236.
The next screen called Debug and is interesting only for those who is developing new commands for the routerbot (you can add new commands to utils.sh file). It displays unix output from all commands issued in roaming mode.
The final screen is help which is obviously providing some help information on how to use your new routerbot. As you can see more commands are introduced in v2 and the most important command is get_distance(). This function returns the distance to the closes obstacle the routerbot is looking at. This function opens new possibilities to operating the routerbot in programmed mode. In v2 you can program not only simple sequences of actions, but also programs that contain conditional operators. Take a look at script #4 – it illustrates this idea.
A few notes before you update the OS.
- Both complete OS image and patch are provided. I recommend full reflash, just make sure you backed up /routerbot, /www and /etc directories from your existing router before proceeding to be able to revert to previous version. Also if you’re applying patch make sure haserl package is installed on your router.
- New release actually contains both v1 and v2. You can choose any version to run by editing /routerbot/version.sh file. Unfortunately I won’t be able to provide support for v1 in the future, but I’ll keep it. v1 also has the web interface, but it is less functional then the one from v2.
- v2 supports many features that you might not have implemented in your router yet. For example
- New version is for 4×4 robots (4×4 works on carpets much better then 4×2 or 3×2, but requires more powerful battery and power supply 12v 2A). If you have only two motors just assign them to front wheels in config.sh and forget about the other two. Everything should work just fine.
- v2 supports web camera. I used this one, but you can get something similar from ebay for about $50. Actually the camera I used produces not very good image, so you might be lucky to get a better one. The camera should be plugged to LAN 4 and obtain IP address from DHCP. Or you can statically assign 192.168.1.236 to it. For AP mode that would be enough to work. For Standalone mode you will also need to add routerbotcam->192.168.1.236 to your DNS. WARNING! If you don’t have any web camera to webpage will take much longer to load (about 10 sec). To fix that just point routerbotcam to some IP that runs a web server.
- v2 supports rangefinder from Maxbotix (entire EZ series should work fine). If you don’t have one program #4 won’t work. You will also need TX line connected from SSC-32. I’ll provide more details later.
- v2 supports LEDs so you can light up your robot. If you don’t have any LEDs attached they won’t work
- When you reflash the routerbot used cable connected to LAN1 and IP address 192.168.1.1. When you work with the routerbot using LAN use 192.168.1.234 and also connect to LAN1. LAN1 is your emergency line for routerbot. It should work in all modes and always statically assigned to 192.168.1.234.
- The web interface is optimized for Firefox only. IE might have problems. I might be interested in fixing this issue in future releases, for now just use Firefox v3.
You can install new OS by reflashing your router with this image: Routerbot v2 image or you can install this patch: Routerbot v2 patch. In order to install the patch delete /routerbot folder, copy patch to the router, unpack it and move patch/routerbot and patch/etc to /. Make sure you have /routerbot, /etc and /www backed up in some safe place.
And the most important thing about this release is “THANK YOU!!” to all who inspired it by sending tons of emails/comments. Thanks you very much!
That’s it for now. I plan to release some schemes, photos, video and minor updates to the code later.
38 Responses to “Routerbot v2”
Leave a Reply
You must be logged in to post a comment.