Rosanswers logo

Hi all,

I'm new in ROS (I'm using Indigo and Ubuntu 16.04), so in order to start to manage ROS environments I have launched the dataset prepared for an algorithm that I have studied (concretely, SVO). But at this point, some doubts arise.

First of all, can one topic have differents kinds of messages? I explain it: I executed commands "rostopic echo /svo/keyframes" and "rostopic echo /svo/points" to see what is published in these topics. According to ROSwiki, tutorials I had seen, and my rqt_graph, I thougth that "svo" is the namespace; but in rviz appears the following fields (Namespaces looks like belong to topics...)

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

Then, how could I see this in rostopic? Default info displayed is only about trajectory points

Same doubt for the the topic /svo/keyframes with cams and kfs namespaces


Thank you so much in advance! Hope anyone can clarify my confusion :)

Edit: Thank you very much for response! It's clearer now.

There you'd need to more details about the node you are using.

I tried to link a screenshot that showed my rviz settings, but I don't know why I did it wrong... so I am going to describe it with more details:

"svo" is a node which publishes in the topics "/svo/points" and "/svo/keyframes". I have 2 Markers to visualize these 2 topics in rviz, one for "/svo/points" and the other for "/svo/keyframes". Both of them, in their rviz Marker, have a dropdown field called 'Namespaces', with 2 options each. For example, in "/svo/points" appear namespace 'pts' (for points on the map) and namespace 'trajectory' (por points that recover the camera path). According to your reply, both ('pts' and 'trajectory') are published with same message format in "/svo/points" topic. Okey, I understand it. But when I execute rostopic echo command with this topic, the bash only displays info about points regardindg to 'trajectory' namespace.

So, my doubts are

  • Are 'pts' and 'trayectory' a namespaces within "/svo/points" topic?
  • How could I see info for 'pts' points with rostopic echo? (By default only displays info for 'trajectory' namespace)

I hope I have expressed myself better. Thanks again. BR.

Originally posted by Ras Vince on ROS Answers with karma: 13 on 2019-08-16

Post score: 0

Original comments

Comment by gvdhoorn on 2019-08-19:
Do not post updates as answers, unless you are answering your own question.

To add more information or to clarify something, edit your original question (using the edit button/link) or post a comment.

Edit: I've also just given you sufficient karma to post your RViz screenshot. So please do so.

Comment by Ras Vince on 2019-08-19:
Sorry, I'll keep it in mind next time. Thanks.


1 Answer 1


Rosanswers logo

(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.


@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.

Originally posted by mgruhler with karma: 12390 on 2019-08-19

This answer was ACCEPTED on the original site

Post score: 2

Original comments

Comment by Ras Vince on 2019-08-20:
Thank you so much! Your explanation really works for me. All understood now on this subject :) Best regards.

Comment by mgruhler on 2019-08-21:
@Ras Vince Happy to help. Please mark this question as answered by clicking the checkmark icon next to the answer. This helps other people quickly filter where they can get the information they are looking for.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.