Robotics StackExchange | Archived questions

Manipulator robot simulation and visualization

Hi All,

I'm novice in ROS2 and I have marginary ROS1 background. I want to experiment with custom trajectory planning algorithms for a manipulator arm. As part of this, I want to do real-time collision detection on GPU, and perhaps also run the whole trajectory planning on GPU. For this purpose, I've created an initial part of the application, which can read an arbitrary URDF file, read its meshes and transform them according to the desired joint positions. These enable me to do collision detection between links and other objects. Currently it works under ROS2 Foxy and exports the actual robot mesh as one STL file for debugging. It is implemented as a single minimal ROS2 Node just to enable me parsing URDF. The code is here: https://github.com/balazs-bamer/link-intersection-brute-force

I know urdf::Model and its other classes are only for representing the URDF parsing result.

My question is what do I need from here to have a dynamic model in the application and have it visualized in either Gazebo or Rviz2? It would be great to utilize the physics simulation capabilities of Gazebo, preferably with optionally "switching off" physics and moving joints just to absolute positions just to visualize trajectory. Is it possible to write an application that simultaneously cooperates with Gazebo and Rviz2 so that I have physics and also for example trajectory visualization in RViz2? If yes, what and how should I implement?

Thank you in advance. Best regards: Balázs

Asked by balazs-bamer on 2021-03-06 14:10:48 UTC

Comments

Answers

It seems I've found the solution: in a Gazebo model plugin I can query the ROS node using

ros::NodeHandle();

This way I will have the best from both worlds. I still need to try it.

Asked by balazs-bamer on 2021-03-08 02:18:51 UTC

Comments