ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Why can't I roslaunch?

asked 2016-05-23 21:01:53 -0600

blairlpp gravatar image

updated 2016-05-25 03:00:13 -0600

gvdhoorn gravatar image

Hi, everyone. Im learning ROS tutorials on wiki.When I first use roslaunch according to the beginner level tutorial, there is something wrong. I don't know why it shows that there is a syntax error at line 1,column 3 cause I just copy the code on tutorial. Please tell me why.

input:

roslaunch beginner_tutorials turtlemimic.launch

output:

logging to /home/bit/.ros/log/........long number....../roslaunch-bit-auto-6902.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

/the following r red words/

invalid roslaunch xml syntax: syntax error: line 1,column 3
the traceback for the exception was written to the log file

This is the turtlemimic.launch file.

   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>
edit retag flag offensive close merge delete

Comments

4

Without seeing your launch file this is going to be rather difficult. Please copy/paste the contents of the launch file you created into your original question. Please use the edit button/link for that (and format it using the Preformatted text button - the one with 101010 on it).

gvdhoorn gravatar image gvdhoorn  ( 2016-05-24 01:54:34 -0600 )edit

Thanks for ur help. I just used the Preformatted text button to upload my code. Do I use it right? Hope ur reply.

blairlpp gravatar image blairlpp  ( 2016-05-25 02:08:01 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2016-05-25 02:44:56 -0600

ROSkinect gravatar image

Because you had copied the line numbers with the text and it said error: line 1,column 3. Click on Toggle line numbers before you copy the text.

Pay attention dude, the important is to understand what you copy and what you do..

<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>
edit flag offensive delete link more

Comments

Oh, my god! What a stupid question! Thank u so much.

blairlpp gravatar image blairlpp  ( 2016-05-26 01:46:57 -0600 )edit

Welcome. Mark it as correct if it is the right answer

ROSkinect gravatar image ROSkinect  ( 2016-05-26 03:51:52 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-05-23 20:42:46 -0600

Seen: 2,127 times

Last updated: May 25 '16