How can I use rosnode to see nodes within other nodes?
Hello,
I am trying to run several nodes within the same executable. Here is a minimal example (a shortened version of this tutorial):
#include "ros/ros.h"
#include "std_msgs/String.h"
int main(int argc, char **argv)
{
ros::init(argc, argv, "node_handle_namespaces");
ros::NodeHandle node1("level1");
while(ros::ok()) {}
return 0;
}
When I run this example, the output of rosnode list
is:
/node_handle_namespaces
/rosout
How can I see whether the level1
node is running?
Asked by sonitron on 2016-06-15 04:19:18 UTC
Answers
In ROS1, there is a one-to-one mapping between nodes and processes. Multiple NodeHandle
s can be created, but they don't map to separate nodes.
Can you perhaps explain a bit more what you are trying to do?
Asked by gvdhoorn on 2016-06-15 04:24:47 UTC
Comments
I want to create a hierarchical multi-agent system with multiple robots that each have several actors. Each robot should have a node handle that I can send commands to. Each actor of the robot should have a node handle that the robot controller can send commands to.
Asked by sonitron on 2016-06-15 04:39:33 UTC
Comments
maybe consider nodelets?
Asked by Mehdi. on 2016-06-15 04:47:40 UTC