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

ros2 topic /initialpose doesn't echo

asked 2019-10-27 09:17:27 -0500

mhallak gravatar image

I am working on Ubuntu 18.04 ROS2 dashing. The command: "ros2 topic echo /initialpose" answers:

$ ros2 topic echo /initialpose
Cannot echo topic '/initialpose', as it contains more than one type: [geometry_msgs/msg/PoseWithCovarianceStamped, std_msgs/msg/String]

Don't know what to do. It seems that I am the only one with this problem since I didn't find any issue open on that...

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-10-27 11:33:46 -0500

clalancette gravatar image

There are two things to know about this.

First, it is possible to have two different publishers to the same topic name with different types in ROS 2. In order to disambiguate them so you can publish them, you can do:

ros2 topic echo /initialpose geometry_msgs/msg/PoseWithCovarianceStamped

or

ros2 topic echo /initialpose std_msgs/msg/String

(but keep reading).

The second thing here is that in most situations, having two things publishing on the same topic name with different types is not what you want. As you see, it is hard to disambiguate them, and it is unclear what the meaning is. Usually this suggests that your ROS 2 network isn't setup properly; either a node is publishing to /initialpose that shouldn't be, or you should remap/namespace the topics.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2019-10-27 09:17:27 -0500

Seen: 2,355 times

Last updated: Oct 27 '19