ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You seem to be comparing rosserial, which is a custom client library specifically targetting micro-controllers and similar resource constraint systems, with roscpp and rospy, which are full client libraries for ROS 1. rosserial on the one hand and roscpp and rospy on the other do not have feature-parity, nor have they been implemented in the same way.

One major difference is the fact that rosserial is not "stand-alone", but requires an "agent" or "bridge" on the ROS side. That's what the IP you pass to initNode(..) is: the address at which that agent node can be found.

The agent is a full ROS node (ie: using rospy or roscpp), and it proxies for the rosserial client. Without that agent (or server), rosserial clients cannot connect to a ROS system.

I would like to publish/subscribe to a series of ROS topics that a specific machine is offering from another machine, being both in the same network. I have done this already using the rosserial_embeddedlinux library,

I don't believe this does what you think it did.

By default, the rosbridge server will make all topics it can see available to the client, not just those for which publishing nodes run on the same machine (it should be possible to configure the server to relay only certain topics, but by default, it does not impose any such limits).

I can't seem to find the correct way to do this, as rospy.init_node does not allow to pass an IP address-like parameter, so I've started to wonder if this is even possible (it probably is, but you never know).

No, this is not supported (nor in roscpp), as the full client libraries do not implement such a communication pattern: full ROS 1 client libraries will, as part of their initialisation, contact the ROS Master, which then informs them of registered nodes and topics (similar to a DNS server).

Even though the Master has an a priori known IP address, you cannot really compare it to how rosserial works. For one thing, the Master is not involved in data exchange between nodes (it's not central broker). It's only role is to provide information on running nodes in a ROS graph.

I would like to publish/subscribe to a series of ROS topics that a specific machine is offering from another machine, being both in the same network.

this seems to be your real question. This can be done, even without rosserial. There are various ways to figure out which topics are published by which nodes, and at which IP addresses they are listening for connections. Note: there is no simple way to figure out which nodes run on which machine I believe. Multi-homed systems complicate this a bit.

You seem to be comparing rosserial, which is a custom client library specifically targetting micro-controllers and similar resource constraint systems, with roscpp and rospy, which are full client libraries for ROS 1. rosserial on the one hand and roscpp and rospy on the other do not have feature-parity, nor have they been implemented in the same way.

One major difference is the fact that rosserial is not "stand-alone", but requires an "agent" or "bridge" on the ROS side. That's what the IP you pass to initNode(..) is: the address at which that agent node can be found.

The agent is a full ROS node (ie: using rospy or roscpp), and it proxies for the rosserial client. Without that agent (or server), rosserial clients cannot connect to a ROS system.

I would like to publish/subscribe to a series of ROS topics that a specific machine is offering from another machine, being both in the same network. I have done this already using the rosserial_embeddedlinux library,

I don't believe this does what you think it did.

By default, the rosbridge server will make all topics it can see available to the client, not just those for which publishing nodes run on the same machine (it should be possible to configure the server to relay only certain topics, but by default, it does not impose any such limits).

I can't seem to find the correct way to do this, as rospy.init_node does not allow to pass an IP address-like parameter, so I've started to wonder if this is even possible (it probably is, but you never know).

No, this is not supported (nor in roscpp), as the full client libraries do not implement such a communication pattern: full ROS 1 client libraries will, as part of their initialisation, contact the ROS Master, which then informs them of all registered nodes and topics topics, regardless of where the nodes which publish them are running (similar to a DNS server).server). To go even further: ROS allows for location transparency, which makes "where do nodes run?" a non-question.

Even though the Master has an a priori known IP address, you cannot really compare it to how rosserial works. For one thing, the Master is not involved in data exchange between nodes (it's not central broker). It's only role is to provide information on running nodes in a ROS graph.

I would like to publish/subscribe to a series of ROS topics that a specific machine is offering from another machine, being both in the same network.

this seems to be your real question. This can be done, even without rosserial. There are various ways to figure out which topics are published by which nodes, and at which IP addresses they are listening for connections. Note: there is no simple way to figure out which nodes run on which machine I believe. Multi-homed systems complicate this a bit.