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

How do i write a custom Gazebo plugin that uses ROS2

asked 2021-11-18 15:14:26 -0500

Mihai D gravatar image

I need to manipulate some joints on a gazebo model and also publish some model properties. I would like to do this using a ROS2 node.

I was able to write a custom model plugin for gazebo that does the needed model manipulations.

I am also able to write a basic ROS2 node that publishes & subscribes.

I don't know how to integrate the two, ROS2 + gazebo. I basically need a model plugin that spawns a ROS2 node. There seem to be different build systems for each of them, i cannot find any documentation on how they go together.

gazebo_ros2_control seems to be close to what i need, but that project does not build for me either, and I would prefer a custom plugin so I am able to control everything i need better.

thanks

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-11-20 07:10:39 -0500

Mihai D gravatar image

Finally found a solution, after failing to build a plugin from scratch.

I built gazebo_ros_pkgs from scratch and started my custom plugin by modifying an existing one, in my case gazebo_ros_pkgs/src/gazebo_ros_pkgs/gazebo_plugins/src/gazebo_ros_diff_drive.cpp.

Instructions on how to build it are here http://gazebosim.org/tutorials?tut=ro...

edit flag offensive delete link more

Question Tools

Stats

Asked: 2021-11-18 15:14:26 -0500

Seen: 928 times

Last updated: Nov 20 '21