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

syntax error near unexpected token 'newline'

asked 2019-06-18 21:01:39 -0500

Dina gravatar image

updated 2019-06-20 11:29:40 -0500

jayess gravatar image

I have cloned the "robot_localization" package and made it catkin but when I am trying to run the nodes I am getting an error like

syntax error near unexpected token 'newline'

'newline'

my launch file are as following

ekf_template.launch

<launch>
  <node pkg="robot_localization" type="ekf_localization_node" name="ekf_se" clear_params="true">
    clear_params="true"&gt;
    <rosparam command="load" file="$(find robot_localization)/params/ekf_template.yaml" />
  </node>
</launch>

ukf_template.launch

<launch>
  <node pkg="robot_localization" type="ukf_localization_node" name="ukf_se" clear_params="true">
    clear_params="true"&gt;
    <rosparam command="load" file="$(find robot_localization)/params/ukf_template.yaml" />
  </node>

Can anyone please tell me how to resolve this issue ?

Thanks

edit retag flag offensive close merge delete

Comments

Are you 'running nodes' or trying to compile the packages? Posting code and actual errors will help.

billy gravatar image billy  ( 2019-06-18 21:39:42 -0500 )edit

Why did you clone and compile this versus installing it via your package manager?

jayess gravatar image jayess  ( 2019-06-18 21:58:14 -0500 )edit

Hi,

Thank you very much for your kind reply. I catkin_make the package.Now I am trying to run the example node file. I have already made it executable.I am receiving the following error

/home/nvidia/myworkspace/src/robot_localization/test/test_ukf_localization_node_bag1.test: line 1: syntax error near unexpected token newline' /home/nvidia/myworkspace/src/robot_localization/test/test_ukf_localization_node_bag1.test: line 1: '

In order to use the robot localization package do i have to install the "sudo apt-get ros-kinetic-robot-localization" apart from cloning the github ?

Can you please tell me where I am making error ?

Thanks

Dina gravatar image Dina  ( 2019-06-19 00:56:44 -0500 )edit

How can I set up the localization package in order to work with it. I have attached my topic in the launch file. But when I am running the command like rosrun robot-loclization ukf_localization_node it's not working properly.

ekf_template.launch

<launch> <node pkg="robot_localization" type="ekf_localization_node" name="ekf_se" clear_params="true"> <rosparam command="load" file="$(find robot_localization)/params/ekf_template.yaml"/>

<!--  Placeholder for output topic remapping
<remap from="odometry/filtered" to="/ins"/>
<remap from="accel/filtered" to="/imu"/>
-->

</node> </launch>

ukf_template.launch

<launch> <node pkg="robot_localization" type="ukf_localization_node" name="ukf_se" clear_params="true"> <rosparam command="load" file="$(find robot_localization)/params/ukf_template.yaml"/>

<!--  Placeholder for output topic remapping
<remap from="odometry/filtered" to="/ins"/>
<remap from="accel/filtered" to="/imu"/>
-->

</node>

Dina gravatar image Dina  ( 2019-06-19 01:16:49 -0500 )edit
2

Please add all of this to your original question.

Use the edit button/link for that. Do not post code/console output more than a few lines in comments.

gvdhoorn gravatar image gvdhoorn  ( 2019-06-19 01:25:46 -0500 )edit

@Dina please don't completely change the question after it's been answered. If the answer solved your problem please mark it as correct. If you have a new question then please ask a new question

jayess gravatar image jayess  ( 2019-06-20 11:31:19 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-06-20 01:30:08 -0500

jayess gravatar image

Your ukf_template.launch file is missing the closing launch tag. It should be

<launch>
  <node pkg="robot_localization" type="ukf_localization_node" name="ukf_se" clear_params="true">
    <rosparam command="load" file="$(find robot_localization)/params/ukf_template.yaml" />
  </node>
</launch> <!-- This was missing -->
edit flag offensive delete link more

Comments

If this isn't it, then please update your question with the full error. It should give a file name and line number.

jayess gravatar image jayess  ( 2019-06-20 01:30:44 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2019-06-18 21:01:39 -0500

Seen: 5,185 times

Last updated: Jun 20 '19