We have driven our friend Rovio with custom controls, viewed his video, and detected some objects and now it’s time for Rovio to go home. Here’s how we got him back to base:
First Rovio needs to know where home is. To do this we use the beacon on the base station and optional extender beacons. On the topic of the extender beacons, the single home beacon has more strength than reported in the web interface. Using the api you can see the signal strength (ss) using the http://xxx.xxx.xxx.xxx/rev.cgi?Cmd=nav&action=1 command. The higher the better we found a number above 5000 seemed adequate to get Rovio home. This beacon also projects its beam onto the ceiling and in doing so projects an oval shape with the two dots being the ends of the oval. In our situation we also needed multiple docks which turns out to cause trouble because all dock ids are set to number 0 and are not changeable. The extender beacons allow multiple id but the docks do not respond to anything but 0 as home. The solution is to only use one 0 beacon and place the docks at least 2 feet apart. Rovio only uses the beam on the ceiling to get right in front of his own home. With home positions set independently on each rover they will navigate to right in front of their home and then use the small dot on the top arm to get into the dock. We ended up using photography lens caps to cover the other beacons.
The documented battery status in the api is 0-79 is not charging, while 80 indicates a charging state. After some discussion with Wowwee, we got a few more statuses:
72: is in the dock fully charged (not charging)
64: status when the Rovio docks but is not charging yet, usually right as it hits the dock
0: not charging
It’s not a ton of new information but does help when dealing with some automated docking.
The experience that was designed did not involve 5 year olds needing to navigate the Rovio back to the dock but relied on the application knowing how to get him back and move to another rover when ready. It was quite a twisted web of calls to the rover but it gave the rover the best chance at getting home to charge.
- Poll the rover to check its battery level with the api call
- If the battery level was below the specified level then continue with the checks
- Switch the video stream to the next rover to prep streaming for the user
- Tell Rovio to go home
- Loop over the api call to see if the charging status is one of the acceptable numbers indicated above (80,72,64), if it doesn’t reach a number send the home request again
- When one of the numbers is achieved switch the api call to the next rover
- Check the next docked rover for its battery level
- If that rover is too low, move to the next until a adequate charge is reached
- Set timers in actionscript to allow for unreachable rovers to be passed over (this speeds up the process, rather than using error catching)