Pi Robot Source Code

Code Repository for the Pi Robot Project

  • ROS Serializer Package: This is a fairly complete ROS package for the Serializer microcontroller made by the Robotics Connection.  It provides access to the analog and digital sensor pins, the PWM servo controller, and the PID motion controller.

  • Installation:

    $ svn checkout http://pi-robot-ros-pkg.googlecode.com/svn/trunk/serializer
    $ cd serializer
    $ rosmake --rosdep-install serializer
    $ cp sample_params.yaml my_params.yaml (call it whatever you like)

    Edit my_params.yaml to match your robot.
    Rename and edit the sample serializer.launch file.

  • Python Serializer library: This is a Python library for controlling the Serializer microcontroller from Robotics Connection. Please see the link below for instructions and the source code.

    Change log from version 0.1.0:

    • Added support for the VPID and DPID parameters. Also changed the default units from inches to meters/cm since ROS seems to prefer metric. With metric units, sensor distance values are in cm and drive motor distances are in meters. There is a flag near the top of the file called INIT_PID which is set to False by default. Once you have set your own PID values, you can set this to True to have them updated on the Serializer.
    • Since ROS uses radians for angles, the rotate() function now expects radians if the units are metric. If the units are English, then it expects degrees.
    • Added function mogo_m_per_s() that lets you tell the robot to move the wheels in meters per second. Again, this is for the benefit of ROS. This assumes you have your PID parameters set up correctly for your robot.
    • Added function travel_at_speed() to move continuously at a given speed.
    • Added rotate_at_speed() to rotate continuously at a given speed.
    • Added functions for the various sensor classes so that they could be more easily used as ROS services. For example, corresponding to the Ping class there is now a function get_Ping(pin, cached) that directly returns the distance from the sensor on the specified pin without first having to instantiate the Ping class.
  • Python Dynamixel library: This is a Python version of the C# library written by Scott Ferguson at Forest Moon Productions. Please see the link below for instructions and the source code.