0
$\begingroup$

Rosanswers logo

I'm trying to analyse the Algorithms in SelfLocalizer node which is Particle Filter, Beam range finder, and Field range finder model. I understand the theory behind it but I want to see what is coming out in some of the equations. I have tried to add std::cout << "TEST" << std::endl; , printf ("%s \n", "TEST"); and ROS_INFO("usage: add_two_ints_client X Y"); in the code, then make the project and then run one of the launch file. I can see a lot of messages and parameters are printet in Terminal, but not the the one that I was expecting. Can anyone help me with that, or how can I read the value of a specific equation ?


Originally posted by RosUser on ROS Answers with karma: 81 on 2016-03-03

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

To be able to print messages on terminal, in launch file you should add output="screen" to the relevant <node> tag.

Also you can view ROS_INFO messages on rqt_console.

In reply to OP's comment:

It should be like this:

<node name="SelfLocalizer" pkg="nav2d_localizer" type="localizer" output="screen">
  <remap from="scan" to="base_scan"/>
  <param name="min_particles" type="int" value="5000"/>
</node>

Originally posted by Akif with karma: 3561 on 2016-03-03

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by RosUser on 2016-03-03:
Thanks but it does not work if it should be like this in launch file: <node name="SelfLocalizer" pkg="nav2d_localizer" type="localizer"> <remap from="scan" to="base_scan"/> <param name="min_particles" type="int" value="5000"/>
output="screen" </node>

Comment by RosUser on 2016-03-03:
Thank you very much, now I can se a lot of printouts :D

Comment by Akif on 2016-03-03:
Glad it helped! :)

Comment by zzzZuo on 2016-05-13:
Thanks you so much for sharing!

Comment by Akif on 2016-05-24:
You're welcome!

$\endgroup$

Your Answer

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