Robotics StackExchange | Archived questions

syntax error near unexpected token 'newline'

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

Asked by Dina on 2019-06-18 21:01:39 UTC

Comments

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

Asked by billy on 2019-06-18 21:39:42 UTC

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

Asked by jayess on 2019-06-18 21:58:14 UTC

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

Asked by Dina on 2019-06-19 00:56:44 UTC

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

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

ukf_template.launch

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

</

Asked by Dina on 2019-06-19 01:16:49 UTC

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.

Asked by gvdhoorn on 2019-06-19 01:25:46 UTC

@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

Asked by jayess on 2019-06-20 11:31:19 UTC

Answers

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 --> 

Asked by jayess on 2019-06-20 01:30:08 UTC

Comments

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

Asked by jayess on 2019-06-20 01:30:44 UTC