ROS electric

roslaunch 사용하기

신영식 2014. 1. 8. 15:32

1. roslaunch [package] [filename.launch]

$ roscd beginner_tutorials
$ mkdir launch $ cd launch

아래와 같은 turtlemimic.launch파일생성
1 <launch> 2 3 <group ns="turtlesim1"> 4 <node pkg="turtlesim" name="sim" type="turtlesim_node"/> 5 </group> 6 7 <group ns="turtlesim2"> 8 <node pkg="turtlesim" name="sim" type="turtlesim_node"/> 9 </group> 10 11 <node pkg="turtlesim" name="mimic" type="mimic"> 12 <remap from="input" to="turtlesim1/turtle1"/> 13 <remap from="output" to="turtlesim2/turtle1"/> 14 </node> 15 16 </launch>


$ roslaunch beginner_tutorials turtlemimic.launch
$ rostopic pub /turtlesim1/turtle1/command_velocity turtlesim/Velocity -r 1 -- 2.0 -1.8