Pried Open
Pawly is being marketed as a way to play with your pet while you're not at home. However it is much more than that. The possibilities are only limited by your imagination.
Opening up the Pawly platform is straightforward. First find the IP address of the Pawly. One way to do this is to connect to your router and see what is online. For example on my home router I point my browser to http://192.168.0.1, then go to IP & MAC Bindings. Once you have the IP you can ssh into the Raspberry Pi inside your Pawly.
Now that you are in, have a look around. You can see that Robot Operation System is installed at /opt/ros/groovy. Suddenly the possibilities expand quickly because ROS has a large and active community, as well as an advanced ecosystem to go with it.
Electric Bloodstream
ROS simplifies process communication in the robot. ROS main concepts are called topics and nodes. Topics know how to make the robot do stuff, such as turn motors on and off. A node can either publish (send messages to) or subscribe (read messages from) a topic.
In addition ROS has a code generation tool that converts your message definitions into C or Python code. This makes for tight code integration with ROS.
Nudge your Robot
A ROS topic is installed that knows how to make the Pawly drive around. The message it takes is a standard twist message. The topic knows how to convert the twist message into a power level on the left and right wheel motors so that it drives in the desired direction. The power level goes from -100 (full reverse) to 0 (stop) to +100 (full forward). A PawlyMove message is also provided that can take these values directly.
For example to spin around in a clockwise circle for 5 seconds you can publish to a topic in Python:
No comments:
Post a Comment