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

Revision history [back]

Rviz is only a data visualizer. As such, you cannot "place" a shape in rviz, but if the shape is being published somewhere, you can subscribe to it and visualize it! There are two easy ways to go about your problem:
1. Work with gazebo and place an object wherever you want. You can then visualize in either a camera pointed towards it or using some lidar scan.
2. Generate markers in code and publish them. This tutorial will show you how to. I'd recommend this method since it sounds like you want it based on the robot position and you can just keep changing the marker pose in code.