• Diff for "rovio_ctrl"
Differences between revisions 28 and 29
Revision 28 as of 2011-11-23 16:54:04
Size: 4377
Comment:
Revision 29 as of 2011-11-23 16:58:43
Size: 4398
Comment:
Deletions are marked like this. Additions are marked like this.
Line 59: Line 59:
  desc = ||<tablewidth="100%" tablestyle="text-align:left">`rovio_teleop` can control the motors and head of a Rovio using the keyboard. Once running the following keys can be used to control to robot: the `w`, `a`, `s`, and `d` keys can be used to move the Rovio forwards, left, backwards, and right respectively; the `q` and `e` keys can be used to rotate left and right respectively; the [`1`-`0`] keys can be used to set the speed in the range [1, 10] respectively (with 1 being the fastest); the `,`, `.`, and '/' keys can be used to set the head in the down, middle, and up positions receptively. || {{attachment:rovio_teleop_joy.gif}} ||   desc = ||<tablewidth="100%" tablestyle="text-align:left">`rovio_teleop` can control the motors, head, and audio device of a Rovio using a joystick. This node listens to a `joy` topic and sends messages to the `cmd_vel` topic in the [[rovio_move]] node, `head_ctrl` service in the [[rovio_head]] node, and `wav_play` service in the [[rovio_audio]] node. Buttons `0`, `1`, and `2` of a joystick control the head, buttons `4`, `5`, `6`, and `7` of a joystick play audio files on the Rovio, and the left and right joysticks control the movement of the Rovio. An example gamepad is shown to the right with its buttons labeled. || {{attachment:rovio_teleop_joy.gif}} ||

Only released in EOL distros:  

rovio: rovio_av | rovio_ctrl | rovio_shared

Package Summary

The rovio_ctrl package contains nodes to control and query the motor and head position of a WowWee Rovio.

rovio: rovio_av | rovio_ctrl | rovio_shared

Package Summary

Control and Query the Movement Devices on a WowWee Rovio

rovio: rovio_av | rovio_ctrl | rovio_shared

Package Summary

Control and Query the Movement Devices on a WowWee Rovio

Nodes

rovio_move

rovio_move controls the motors of the Rovio.

Subscribed Topics

man_drv (rovio_shared/man_drv)
  • Control the movement of the Rovio using movement and speed commands as defined by the Rovio API.
cmd_vel (geometry_msgs/Twist)
  • Control the movement of the Rovio using a geometry_msgs/Twist message. A positive angular-z value corresponds to a clockwise rotation. Movement along linear-y corresponds to moving left/right and movement along linear-x corresponds to moving forwards/backwards.

Parameters

/rovio_shared/host (string)
  • Hostname used to communicate with the Rovio.
/rovio_shared/user (string)
  • Username used to authenticate with the Rovio.
/rovio_shared/pass (string)
  • Password used to authenticate with the Rovio.

rovio_head

rovio_head publishes the position of the head as well as allows for head position control.

Published Topics

head_sensor (std_msgs/String)
  • Current head position of the Rovio {"HEAD_UP", "HEAD_MIDDLE", "HEAD_DOWN"}.

Services

head_ctrl (rovio_shared/head_ctrl)
  • Change the position of the Rovio's head.

Parameters

/rovio_shared/host (string)
  • Hostname used to communicate with the Rovio.
/rovio_shared/user (string)
  • Username used to authenticate with the Rovio.
/rovio_shared/pass (string)
  • Password used to authenticate with the Rovio.

rovio_teleop

rovio_teleop can control the motors, head, and audio device of a Rovio using a joystick. This node listens to a joy topic and sends messages to the cmd_vel topic in the rovio_move node, head_ctrl service in the rovio_head node, and wav_play service in the rovio_audio node. Buttons 0, 1, and 2 of a joystick control the head, buttons 4, 5, 6, and 7 of a joystick play audio files on the Rovio, and the left and right joysticks control the movement of the Rovio. An example gamepad is shown to the right with its buttons labeled. rovio_teleop_joy.gif

Subscribed Topics

joy (sensor_msgs/Joy)
  • Listens for joystick commands.

Published Topics

cmd_vel (geometry_msgs/Twist)
  • Control the movement of the Rovio using the left and right joysticks.

Services Called

head_ctrl (rovio_ctrl/head_ctrl)
  • Change the position of the Rovio's head using buttons 0, 1, or 2 of a joystick.
wav_play (rovio_shared/wav_play)
  • Play one of four predefined .wav files using buttons 4, 5, 6, or 7 of a joystick.

Parameters

/rovio_shared/rovio_wav (string)
  • Absolute path to the wav folder within the rovio_av package. This is used when playing audio files using buttons 4, 5, 6, or 7 of a joystick.

Startup

The rovio_ctrl package contains a ctrl.launch file which should be edited with the hostname, username and password to login to your Rovio. This files launches an instance of the rovio_move and rovio_head nodes. To launch these nodes, the following commands can be used:

Toggle line numbers
   1 roscd rovio_ctrl
   2 rosmake rovio_ctrl
   3 roslaunch ctrl.launch

With the above nodes running, the keyboard teleoperation node (rovio_teleop) can be utilized with the following command:

Toggle line numbers
   1 rosrun rovio_ctrl rovio_teleop

Support

Please feel free to contact me at any point with questions, comments, and bug reports.

Wiki: rovio_ctrl (last edited 2012-12-29 21:22:58 by Russell Toris)