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

Robot Simulation using RViz as part of Custom GUI

asked 2018-02-16 15:58:56 -0500

firim gravatar image

Hello

I am trying to implement a GUI (using C++ and QT) to control my robot. I would like to have a simulation of my robot to be part of the GUI so that I can first move my robot on the simulation (using my GUI controls) and see if the move is collision-free and then move the real robot.

I can run my robot's simulation in RViz and move my robot. Now I would like to "embed" what I see in RViz (as the simulation of my robot) into my GUI application as a QWidget.

I know this tutorial on librviz, however this tutorial is too simplistic as it only adds an empty grid into custom C++ GUI app but does not implement any robot visualization/interaction.

Can you suggest any better documentation or example projects that I can dig into? Any help or suggestion would be very much appreciated.

Thanks in advance!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-02-17 22:44:37 -0500

lucasw gravatar image

updated 2018-02-17 22:45:20 -0500

There isn't a whole lot more to it than the tutorial if you are only concerned with Displays- you can take every Display you have in rviz and use it in librviz with createDisplay and subProp and setValue calls. All the names are the same as what is in rviz, to know that 'Grid' has to be 'rviz/Grid' go into the Add | By display type and the first part of the name is the same as the folder the display is in.

I haven't run this code in a while but this https://github.com/lucasw/rviz_camera... was a project to make a librviz panel that was initially blank but could be configured to any display via service calls.

The other parts of rviz I'm not sure about, and probably deserve the own questions (if there aren't already questions and answers here): how to have tools like '2D nav goal' in a librviz panel, or how to programmatically control the type, position, and angle of the camera (there is ViewController documentation about this?).

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2018-02-16 15:58:56 -0500

Seen: 1,744 times

Last updated: Feb 17 '18