Contents
Edge Case #1
Services
get_config (photo/GetConfig)
- queries the value of a parameter
set_config (photo/SetConfig)
- sets the value for a given parameter
capture (photo/Capture)
- Image width
Edge Case #2
smart_arm.yaml
The smart_arm.yaml configuration file contains all the parameters needed by ax12_controller_core package's controller_manager.py. The launch files provided will place the yaml file on the param server and load a smart_arm_controller by sending a list of joint controllers to the controller_spawner script. The smart_arm will run in the controller_manager node and you can specify angle positions for each joint on the smart arm. Depending on the value in the update_rate parameter, the smart_arm node will publish each joint's current state as well. Each controller type from the yaml file will create Publisher/Subscriber topics with the controller name. (Please see the tutorials for this package.)
Subscribed Topics
shoulder_pan_controller/command (std_msgs/Float64)
- Subscribes to this topic for new commands. A command tells the shoulder_pan_joint to go to the specified angle in radians.
shoulder_tilt_controller/command (std_msgs/Float64)
- Subscribes to this topic for new commands. A command tells the shoulder_tilt_joint to go to the specified angle in radians.
Published Topics
shoulder_pan_controller/state (ua_controller_msgs/JointStateList)
- Joint state data from the AX-12+ servos.
shoulder_tilt_controller/state (ua_controller_msgs/JointStateList)
- Joint state data from the AX-12+ servos.
Parameters
shoulder_pan_joint
All of these parameters are specified in the smart_arm.yaml. The motor ids and min/max angles can be reconfigured in this file.
/shoulder_pan_controller/controller/package (str, default: ax12_controller_core)
- The package for the joint controller type.
/shoulder_pan_controller/controller/module (str, default: joint_position_controller)
- The python module which specifies the type of controller.
shoulder_tilt_joint
All of these parameters are specified in the smart_arm.yaml. The motor ids and min/max angles can be reconfigured in this file.
/shoulder_tilt_controller/controller/package (str, default: ax12_controller_core)
- The package for the joint controller type.
/shoulder_tilt_controller/controller/module (str, default: joint_position_controller_dual_motor)
- The python module which specifies the type of controller.
elbow_tilt_joint
All of these parameters are specified in the smart_arm.yaml. The motor ids and min/max angles can be reconfigured in this file.
/elbow_tilt_controller/controller/package (str, default: ax12_controller_core)
- The package for the joint controller type.
/elbow_tilt_controller/controller/module (str, default: joint_position_controller_dual_motor)
- The python module which specifies the type of controller.
Full Example
turtlesim_node
turtlesim_node provides a simple simulator for teaching ROS concepts.
Subscribed Topics
turtleX/command_velocity (turtlesim/Velocity)
- The linear and angular command velocity for turtleX. The turtle will execute a command_velocity 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 (turtlesim/Velocity)
The input topic for the mimic node. The topic must be remapped to the command_velocity topic of the desired turtle to mimic.
Published Topics
output (turtlesim/Velocity)
The output topic for the mimic node. The topic must be remapped to the command_velocity topic of the mimicking turtle.