Robotics StackExchange | Archived questions

Fail to create the roslaunch file.

I'm ROS starter, and I'm following the ROS beginner tutorials step by step. Now I'm on using rosrqtconsol and roslaunch. I created the turtlemimic.launch file in the catkin_ws/src/beginner_tutorials/launch using the gedit. In turtlemimic.launch file, I copied and pasted following:

   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>

Just like the tutorials. But when I did roslaunch, I got this messages.

... logging to /home/user01/.ros/log/e7ccb2d6-e821-11e8-b66a-4ccc6af183ea/roslaunch-trailENG03869-15281.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

Invalid roslaunch XML syntax: syntax error: line 1, column 3
The traceback for the exception was written to the log file

How can I solve this problem?

Asked by 3104 on 2018-11-14 10:37:44 UTC

Comments

Why did you delete the question?

Asked by gvdhoorn on 2018-11-14 10:55:01 UTC

Answers

I copied and pasted following:

   1 <launch>
   2 
   3   <group ns="turtlesim1">
   4     <node pkg="turtlesim" name="sim" type="turtlesim_node"/>
   5   </group>
   6 
   7 ...

If that is an actual copy-paste, then the problem is the line numbers.

Those are not supposed to be there.

Remove them and try again.

Asked by gvdhoorn on 2018-11-14 10:47:49 UTC

Comments