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

Error "bash: syntax error near unexpected token `newline'" during tutorial

asked 2017-12-22 20:48:25 -0500

ju78iklo9 gravatar image

updated 2017-12-22 22:35:35 -0500

130s gravatar image

Starting my training back up I arrived successfully at: Using rqt_console and roslaunch

All previous lessons were achieved.

ROS' roscore command was entered into a separate terminal earlier. Tests up to this point all work as directed by ROS wiki.

Now, at this point:

By entering "echo $ROS_PACKAGE_PATH" this command outputs to one of my Ubuntu terminals:

/home/ju78iklo9/catkin_ws/src:/opt/ros/kinetic/share

While in ju78iklo9@ju78iklo9-Lenovo-H50-00:~/catkin_ws/src/beginner_tutorials/launch$

I entered:

roslaunch beginner_tutorials turtlemimic.launch

Ubuntu terminal outputs:

roslaunch beginner_tutorials turtlemimic.launch

I get this response:

...  logging to /home/ju78iklo9/.ros/log/a29cb34c-e6b4-lle7-aa15-acb57d898fed/roslaunch-ju78iklo9-Lenovo-H50-00-6404.log
Checking log directory for disk usage This may take awhile.
Press Ctrl-C to interrupt
Don 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

Meanwhile...my "launch" file is/was copied directly from ROS tutorials. A vim "less" command reproduces:

   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>

Opening the log file in vim produces an amazing laundry list of errors. For example:

1 <launch>
bash: syntax error near unexpected token `newline'
2
2: command not found
3 <group ns="turtlesim1"
bash: syntax error near unexpected token `newline'

My questions is, "what is the problem? Why can't I proceed with ROS tutorials at this point?

Thank you in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2017-12-22 22:35:06 -0500

130s gravatar image

If what you cited is the actual file content of yours, you copied the line number index that ROS wiki kindly shows for you. By clicking "Toggle line numbers" you can make those numbers disappear.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-12-22 20:48:25 -0500

Seen: 4,919 times

Last updated: Dec 22 '17