Best way to Use rviz to build interactive 3D environment

asked 2015-03-30 19:17:40 -0500

firstprayer gravatar image

I'm a novice of ros and rviz. Right now I need to use rviz to develop an interactive application.

In the application it renders the 3D world from the 2D perspective, like the usual way.

There will be objects (could be complex shapes, like a quadcopter) in the space, and their coordiate would be provided through some topics.

The application need to support three types of interactions:

  1. The user click on the screen. By doing this he/she can select one of the objects
  2. The user can draw a circle (or ellipse), all objects fall within the shape will be selected
  3. Finally, of course, the user can move around the space, change the direction of viewpoint, etc. This can be seen as moving the camera.

Essentially I think I need to access and control the camera location of rviz programatically, then I can use some affine transformation to implement 1, 2.

After doing some preliminary search, there seems to be two possible ways:

  1. Create a panel plugin for rviz
  2. Create an independent application using librviz.

Right there's quite a strict time limit - I got a couple of days for this, so I would like some recommendations on what's the fastest way of doing this.

I'm familiar with C++ and Python, but not with Qt.

Thanks

edit retag flag offensive close merge delete

Comments

Considering you have only two days for this - maybe you can find some of the functionality you are looking in the interactive_markers package. Accessing and controlling the camera location of rviz can be done but needs a bit of Qt and OGRE learning.

2ROS0 gravatar image 2ROS0  ( 2015-03-31 00:00:56 -0500 )edit

Actually I don't mind learning QT or any libraries. But I just couldn't find tutorials on this. Can you point me some directions @2ROS0?

firstprayer gravatar image firstprayer  ( 2015-03-31 13:00:24 -0500 )edit