0
$\begingroup$

Rosanswers logo

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>

Originally posted by blairlpp on ROS Answers with karma: 31 on 2016-05-23

Post score: 0


Original comments

Comment by gvdhoorn on 2016-05-24:
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).

Comment by blairlpp on 2016-05-25:
Thanks for ur help. I just used the Preformatted text button to upload my code. Do I use it right? Hope ur reply.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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>

Originally posted by ROSkinect with karma: 751 on 2016-05-25

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by blairlpp on 2016-05-26:
Oh, my god! What a stupid question! Thank u so much.

Comment by ROSkinect on 2016-05-26:
Welcome. Mark it as correct if it is the right answer

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.