Ask Your Question
0

when i study the rviz:Markers: Sending Basic Shapes (C++), i come across some problem: when i run this order: rosrun using_markers basic_shapes, it told me that "Please create a subscriber to the marker",so how to solve this problem?

asked 2017-08-01 21:31:58 -0600

liangminglan55 gravatar image

1.my rosdistro: indigo; my ros workspace is catkin.

2.my tutorial:link text 3.and then when i run :rosrun rviz rviz, it come up with nothing in my rviz, like this picture:no fixed frame, no shape on the plane.


  • List item
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-08-02 07:36:19 -0600

naveedhd gravatar image

This problem is solved by doing exactly what it told you: "Please create a subscriber to the marker"

When you do rosrun using_markers basic_shapes, this node publishes to topic /visualization_markers. You can verify that markers are being published by running rostopic echo /visualisation_markers in another terminal.

To visualise the marker in rviz, you have to do few additional things in rviz:

  1. Add display of Marker (this subscribes to the marker topic)
  2. Change the Fixed frame to my_frame (this is specified in line 47 of basic_shapes node)

gif illustrating above points

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2017-08-01 21:31:58 -0600

Seen: 288 times

Last updated: Aug 02 '17