I want to visualize an OrientedBoundingBox from Open3D on RVIZ, I have seen the :

  1. RvizVisualTools::publishWireframeRectangle
  2. RVIZ Line Segments

publishWireframeRectangle has two dimensions width, and height, while I still have length, and for RVIZ Line Segment I have to develop the function myself, I wonder if there is a ready to use function to publish RVIZ Marker for OrientedBoundingBox which is ready to use, can you please tell me if there is any? thanks in advance.


2 Answers 2


The tool that builds on Rviz Visual Tools is Moveit Visual Tools. MoveIt Visual Tools is more high-level and focused on MoveIt-related debugging and visualization. That being said, MVT extends RVT with inheritance, which makes all the functionality you need available in both.

Here are the available shapes from (Rviz Visual Tools):

enter image description here

To start, you can use the method RvizVisualTools::publishWireframeRectangle and see if this satisfies what you need. If you want to customize the bounding box edge shapes, you can use the publishLine or publishCylinder methods to draw edges. This is doable in the same way that publishWireframeRectangle works, given the center and dimensions of the bounding box.

Try to familiarize yourself first with publishing shapes and markers before building your own. You need a Markers display in Rviz that visualizes shapes published on a specific topic. You set the topic name when defining the rviz_visual_tools::RvizVisualTools object.

Regarding the orientation, you would do some basic trigonometry to determine the starting and ending of edges. Start with implementing something simple, then figure out the formula that robustly works for the orientation.


I found that publishWireframeCuboid has the ability to publish a bounding box with different length/width/height values:

bool publishBBOX(open3d::geometry::OrientedBoundingBox& bbox, int box_id, std::string box_ns)

  rviz_visual_tools::RvizVisualToolsPtr visual_tools_;
  Eigen::Isometry3d bbox_iso_pose;
  bbox_iso_pose.translation() = bbox.center_;
  bbox_iso_pose.linear() = bbox.R_;
  geometry_msgs::Pose bbox_pose;
  tf::poseEigenToMsg(bbox_iso_pose, bbox_pose);

    bbox_iso_pose, bbox.GetMinBound(), bbox.GetMaxBound(),  
    visual_tools_->getRandColor(), box_ns, box_id
  return true;

enter image description here


Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.