Actions

Robotics Class 2011/Assignment 1

From HacDC Wiki

Assignment 1 for the Robotics Class 2011

Write a ROS node that subscribes to the "sensorPacket" topic (a message of type irobot_create_2_1/SensorPacket), and uses values from within this packet to represent the emotional state of the robot. You will then publish the robot emotional state via publishing a message of type robot_emotions/EmotionalState with the topic name "robot_emotions".

In order to obtain the definition of the robot_emotions/EmotionalState message, you will need to check out the robot_emotions ROS package from the HacDC ROS repository:

cd to where you store your downloaded ROS packages svn co http://hacdc-ros-pkg.googlecode.com/svn/trunk/robot_emotions rosmake robot_emotions

You can explore the structure of the two above message types by using rosmsg show in the following way: rosmsg show irobot_create_2_1/SensorPacket rosmsg show robot_emotions/EmotionalState

Assignment Hint: The robot_emotions ROS package is actually a complete (but very simple) solution to the homework. Feel free to investigate it if you need help. If you want to try running the emotion generator provided within the robot_emotions package, just type (after doing the rosmake robot_emotions above):

rosrun rosrun robot_emotions emotion_generator.py

After typing this, a "rostopic list" command will show a new topic called robot_emotions, just as the assignment asked for.