## 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 = Robot manipulation ## multi-line description to be displayed in search ## description = How to move and delete robots in the environment, using command-line tools ## the next tutorial description (optional) ## next = ## links to next tutorial (optional) ## next.0.link= [[stdr_simulator/Tutorials/Using YAML files]] ## next.1.link= ## what level user is this tutorial for ## level= BeginnerCategory ## keywords = #################################### <> <> === Using robot_handler to add, delete and move a robot === Assuming you have a `stdr_server_node` running, with a map loaded from previous tutorial, we are going to add a robot using command-line tool `robot_handler`. More detailed documentation about `robot_handler` [[stdr_robot#robot_handler|here]]. ==== Adding a robot ==== We will add a new robot to x=9, y=7, theta=1.57. In a new terminal, run: {{{ $ roscd stdr_resources $ rosrun stdr_robot robot_handler add resources/robots/pandora_robot.yaml 9 7 1.57 }}} ==== Launching STDR GUI, to visualize ==== In a new terminal, run: {{{ $ roslaunch stdr_gui stdr_gui.launch }}} You should see something like this: {{attachment:gui_launch.png|gui_launch|width=760}} ==== Moving the robot to a new pose ==== We will move the robot to x=2, y=2, theta=0. Run: {{{ $ rosrun stdr_robot robot_handler replace /robot0 2 2 0 }}} You should see that the robot moved successfully in the desired pose: {{attachment:gui_replace.png|gui_replace|width=760}} ==== Deleting a robot ==== We are going to delete the robot with name `/robot0`. Run: {{{ $ rosrun stdr_robot robot_handler delete /robot0 }}} To learn how to manipulate a robot using the STDR GUI, follow [[stdr_simulator/Tutorials/Basic GUI usage#Load_a_robot_in_a_map|this]] tutorial. ## AUTOGENERATED DO NOT DELETE ## TutorialCategory ## FILL IN THE STACK TUTORIAL CATEGORY HERE