• Diff for "turtlesim"
Differences between revisions 38 and 39
Revision 38 as of 2010-03-22 17:37:53
Size: 2825
Editor: TullyFoote
Comment:
Revision 39 as of 2013-11-26 20:01:51
Size: 3061
Editor: DirkThomas
Comment: add hydro changes to use Twist / cmd_vel
Deletions are marked like this. Additions are marked like this.
Line 23: Line 23:

<<Version(ROS hydro)>> As of ''Hydro'' turtlesim uses the [[geometry_msgs]]/Twist message instead of its own custom one (''turtlesim/Velocity'' in ''Groovy'' and older). Also the topic has been changed to `cmd_vel` (instead of `command_velocity` before).
Line 29: Line 32:
  0.name= turtleX/command_velocity
  0.type= turtlesim/Velocity
  0.desc= The linear and angular command velocity for turtleX. The turtle will execute a command_velocity for 1 second then time out.
  0.name= turtleX/cmd_vel
  0.type= geometry_msgs/Twist
  0.desc= The linear and angular command velocity for turtleX. The turtle will execute a velocity command for 1 second then time out.
Line 81: Line 84:
  0.type= turtlesim/Velocity
  0.desc= The input topic for the `mimic` node. The topic must be remapped to the command_velocity topic of the desired turtle to mimic.
  0.type= geometry_msgs/Twist
  0.desc= The input topic for the `mimic` node. The topic must be remapped to the cmd_vel topic of the desired turtle to mimic.
Line 86: Line 89:
  0.type= turtlesim/Velocity
  0.desc= The output topic for the `mimic` node. The topic must be remapped to the command_velocity topic of the mimicking turtle.
  0.type= geometry_msgs/Twist
  0.desc= The output topic for the `mimic` node. The topic must be remapped to the cmd_vel topic of the mimicking turtle.

  Show EOL distros: 

ros_tutorials: roscpp_tutorials | rospy_tutorials | turtlesim

Package Summary

turtlesim is a tool made for teaching ROS and ROS-PKGS.

ros_tutorials: roscpp_tutorials | rospy_tutorials | turtlesim

Package Summary

turtlesim is a tool made for teaching ROS and ROS-PKGS.

ros_tutorials: roscpp_tutorials | rospy_tutorials | turtlesim

Package Summary

turtlesim is a tool made for teaching ROS and ROS-PKGS.

ros_tutorials: roscpp_tutorials | rospy_tutorials | turtlesim

Package Summary

turtlesim is a tool made for teaching ROS and ROS packages.

ros_tutorials: roscpp_tutorials | rospy_tutorials | turtlesim

Package Summary

turtlesim is a tool made for teaching ROS and ROS packages.

ros_tutorials: roscpp_tutorials | rospy_tutorials | turtlesim

Package Summary

turtlesim is a tool made for teaching ROS and ROS packages.

ros_tutorials: roscpp_tutorials | rospy_tutorials | turtlesim

Package Summary

turtlesim is a tool made for teaching ROS and ROS packages.

ros_tutorials: roscpp_tutorials | rospy_tutorials | turtlesim

Package Summary

turtlesim is a tool made for teaching ROS and ROS packages.

ros_tutorials: roscpp_tutorials | rospy_tutorials | turtlesim

Package Summary

turtlesim is a tool made for teaching ROS and ROS packages.

ros_tutorials: roscpp_tutorials | rospy_tutorials | turtlesim

Package Summary

turtlesim is a tool made for teaching ROS and ROS packages.

ros_tutorials: roscpp_tutorials | rospy_tutorials | turtlesim

Package Summary

turtlesim is a tool made for teaching ROS and ROS packages.

Getting Started with Turtlesim

Start the roscore:

$ roscore

To compile and start the turtlesim:

$ rosmake turtlesim
$ rosrun turtlesim turtlesim_node

You'll see the turtlesim window:

  • turtlesim.png

Nodes

New in ROS hydro As of Hydro turtlesim uses the geometry_msgs/Twist message instead of its own custom one (turtlesim/Velocity in Groovy and older). Also the topic has been changed to cmd_vel (instead of command_velocity before).

turtlesim_node

turtlesim_node provides a simple simulator for teaching ROS concepts.

Subscribed Topics

turtleX/cmd_vel (geometry_msgs/Twist)
  • The linear and angular command velocity for turtleX. The turtle will execute a velocity command for 1 second then time out.

Published Topics

turtleX/pose (turtlesim/Pose)
  • The x, y, theta, linear velocity, and angular velocity of turtleX.

Services

clear (std_srvs/Empty)
  • Clears the turtlesim background and sets the color to the value of the background parameters.
reset (std_srvs/Empty)
  • Resets the turtlesim to the start configuration and sets the background color to the value of the background.
kill (turtlesim/Kill)
  • Kills a turtle by name.
spawn (turtlesim/Spawn)
  • Spawns a turtle at (x, y, theta) and returns the name of the turtle. Also will take name for argument but will fail if a duplicate name.
turtleX/set_pen (turtlesim/SetPen)
  • Sets the pen's color (r g b), width (width), and turns the pen on and off (off).
turtleX/teleport_absolute (turtlesim/TeleportAbsolute)
  • Teleports the turtleX to (x, y, theta).
turtleX/teleport_relative (turtlesim/TeleportRelative)
  • Teleports the turtleX a linear and angular distance from the turtles current position.

Parameters

~background_b (int, default: 255)
  • Sets the blue channel of the background color.
~background_g (int, default: 86)
  • Sets the green channel of the background color.
~background_r (int, default: 69)
  • Sets the red channel of the background color.

mimic

mimic provides a simple interface for making one turtlesim mimic another.

Subscribed Topics

input (geometry_msgs/Twist)
  • The input topic for the mimic node. The topic must be remapped to the cmd_vel topic of the desired turtle to mimic.

Published Topics

output (geometry_msgs/Twist)
  • The output topic for the mimic node. The topic must be remapped to the cmd_vel topic of the mimicking turtle.

Wiki: turtlesim (last edited 2020-10-02 01:28:51 by melwin)