User Tools

Site Tools


neurali:ros_roslaunch

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

neurali:ros_roslaunch [2018/04/25 07:55]
neurali:ros_roslaunch [2020/06/08 22:20] (current)
Line 1: Line 1:
 +< [[neurali:ros]]
  
 +====== roslaunch ======
 +
 +
 +  * **rosrun** avvia un nodo alla volta
 +  * **roslaunch** avvia più nodi alla volta
 +
 +
 +  rosrun gazebo_ros gzserver
 +  rosrun gazebo_ros gzclient
 +  rosrun rospy_tutorials talker chatter:=/wg/chatter
 +
 +l'ultimo comando rimappa i nomi delle risorse (il topic si chiamava chatter)
 +
 +  roslaunch [package] [filename.launch]
 +
 +
 +Il file deve avere estensione **.launch** (è in xml) e deve appartenere ad un proprio [[neurali:ros packages|package]]-lanciatore, con un proprio workspace...
 +
 +<code xml>
 +<launch>
 +
 +  <group ns="turtlesim1">
 +    <node pkg="turtlesim" name="sim" type="turtlesim_node"/>
 +  </group>
 +
 +  <group ns="turtlesim2">
 +    <node pkg="turtlesim" name="sim" type="turtlesim_node"/>
 +  </group>
 +
 +  <node pkg="turtlesim" name="mimic" type="mimic">
 +    <remap from="input" to="turtlesim1/turtle1"/>
 +    <remap from="output" to="turtlesim2/turtle1"/>
 +  </node>
 +
 +</launch>
 +</code>
 +
 +<code>
 +$ cd ~/catkin_ws
 +$ source devel/setup.bash
 +$ roscd beginner_tutorials
 +$ mkdir launch
 +$ cd launch
 +</code>
 +  roslaunch beginner_tutorials turtlemimic.launch