## page was copied from robotican/Tutorials/Moving the head ## For instruction on writing tutorials ## http://www.ros.org/wiki/WritingTutorials #################################### ##FILL ME IN #################################### ## for a custom note with links: ## note = ## for the canned note of "This tutorial assumes that you have completed the previous tutorials:" just add the links ## note.0= ## descriptive title for the tutorial ## title = Moving the head ## multi-line description to be displayed in search ## description = Moving the head using the Pan-Tilt system ## the next tutorial description (optional) ## next = ## links to next tutorial (optional) ## next.0.link= [[armadillo2/Tutorials/Moving the torso|Moving the torso]] ## next.1.link= ## what level user is this tutorial for ## level= BeginnerCategory ## keywords = #################################### !<> <> === Controlling the Pan and Tilt Joints === The Pan-Tilt system can be controlled using its [[position_controllers|position_controllers/JointTrajectoryController]]. You can send [[http://docs.ros.org/jade/api/trajectory_msgs/html/msg/JointTrajectory.html|trajectory_msgs::JointTrajectory]] to the '''pan_tilt_trajectory_controller/command''' topic. For this demonstration we will launch the Armadillo robot in Gazebo: {{{ $ roslaunch armadillo2 armadillo2.launch gazebo:=true }}} Now, Lets move the pan and tilt by typing: {{{ $ rosservice call /services/pan_tilt_mover "pan: 0.2 tilt: 0.1" }}} This will move the head to the position of 0.2 radians to the left and 0.1 radians down. You can also specify desired joints goals by publishing the desired angles to the '''pan_tilt_trajectory_controller/command''' topic. Play with the angles and watch the pan-tilt system move in the Gazebo window. Note: 1. Positive values will make the system turn left and down. 2. The limits of the head's angles are π/6 up, 50π/180 down and π/4 to each side. == ## AUTOGENERATED DO NOT DELETE ## TutorialCategory ## FILL IN THE STACK TUTORIAL CATEGORY HERE