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

Revision history [back]

(I'm using Indigo and Ubuntu 16.04)

Let's start with this :-) If there is no very specific reason to use Indigo, I'd suggest to migrate to another Ubuntu/ROS version, as Indigo is EOL. I'd suggest you use Melodic, as this is the latest release...

can one topic have differents kinds of messages?

No, they must all be of the same "kind", i.e. message type (e.g. std_msgs/Int32). But any node can publish to that topic.

I executed commands "rostopic echo /svo/keyframes" and "rostopic echo /svo/points" to see what is published in these topics.

Yes, that are two topics. They are put into a namespace (you are correct there as well), to show that they are somehow related. The extent to which they are related can be from: "published in the same node" to "both are required for a consumer to work properly". But rviz can only visualize single topics, not namespaces, which is why the full name appears. Otherwise you would not be able to distinguish between the same type of topic from multiple nodes (often an issue when using multiple sensors, e.g. two cameras, where both publish an image topic).

Does it mean that in the same topic ("/svo/points") are being published points from map and from trajectory?

This I don't understand, but I don't think this is (or at least should not be) the case. There you'd need to more details about the node you are using.

I hope this helps. Please edit your question with follow-up information.

(I'm using Indigo and Ubuntu 16.04)

Let's start with this :-) If there is no very specific reason to use Indigo, I'd suggest to migrate to another Ubuntu/ROS version, as Indigo is EOL. I'd suggest you use Melodic, as this is the latest release...

can one topic have differents kinds of messages?

No, they must all be of the same "kind", i.e. message type (e.g. std_msgs/Int32). But any node can publish to that topic.

I executed commands "rostopic echo /svo/keyframes" and "rostopic echo /svo/points" to see what is published in these topics.

Yes, that are two topics. They are put into a namespace (you are correct there as well), to show that they are somehow related. The extent to which they are related can be from: "published in the same node" to "both are required for a consumer to work properly". But rviz can only visualize single topics, not namespaces, which is why the full name appears. Otherwise you would not be able to distinguish between the same type of topic from multiple nodes (often an issue when using multiple sensors, e.g. two cameras, where both publish an image topic).

Does it mean that in the same topic ("/svo/points") are being published points from map and from trajectory?

This I don't understand, but I don't think this is (or at least should not be) the case. There you'd need to more details about the node you are using.

I hope this helps. Please edit your question with follow-up information.


Edit

@Ras Vince thanks for the update. This really clarifies and very well describes the issue.

With visualization_msgs/Marker there is actually another set of "namespaces" available. I didn't think of this so this is why I didn't understand your issue before. The screenshot now makes the problem clear.

As the message definition states:

Namespace to place this object in... used in conjunction with id to create a unique name for the object

The thing with markers is now that the objects published to the marker topic are actually persistent, until an object with the same unique name is republished. As stated above, the unique name consists of the namespace ns as well as the id that is published to the topic.

To quickly see if it is actually only the trajectory namespace being published, or if there are multiple ones, you can use rostopic echo /svo/points/ns which will only print the namespaces. It could very well be that the two namespaces are published with different frequencies.

I hope this clarifies a bit the issue you are seeing here.