I'm using C++ to program two nodes on ROS melodic with Gazebo 9.9.0 running on an Ubuntu 18.04.2 LTS.
I'm learning ROS and I have to do the same: move a robot, Pioneer 2DX, to make a map using Odometry.
Yes, I know, there are a lot of better ways to do a map, but I'm learning and this is an exercise that I have to do at the university.
I've thought to use two nodes:
- One to store odometry data.
- Other to move the robot using keyboard.
My problem, or doubt, is that I need to use Odometry data on both. In the second one, because if I have to rotate the robot, I need to know robot's heading.
I'm using ros::spinOnce();
to process callbacks waiting.
My question is: if one node read a Odometry message, that message read from one node, will it be available for the other node? Or maybe, I will lose that message.
I've also thought to use one node to store odometry data and also to move the robot if calling ros::spinOnce();
will make me to lose the message.
Originally posted by Elric on ROS Answers with karma: 71 on 2019-07-22
Post score: 0