ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Hey mab0189!
The reason that you cannot see the log info is because your callback callc_listener.callback
is never executed.
But why is that? Well in this case it is from the grouping of each node under a different namespace.
Your talker
node is under the "talker"
namespace meaning that (unless specified to be global) subscriptions are nested under that namespace. This means that your talker node is publishing to the topic /talker/Calc_Chatter
and similarly your listener is listening on the topic /listener/Calc_Chatter
. These two topics are clearly different and that is the root of your issue.
The solution is therefore to remove the (in this case) unneeded group
tags that currently wrap your nodes in the launch file.
try...
<launch>
<node pkg="calculate" name="my_calc_talker" type="calc_talker.py" output="screen"/>
<node pkg="calculate" name="my_calc_listener" type="calc_listener.py" output="screen"/>
</launch>
A few other notes.
rostopic list
after launching your launch file. output="screen"
is required for the logging to be visible when using the launch file.