gazebosim / ros_gz

Integration between ROS (1 and 2) and Gazebo simulation
https://gazebosim.org
Apache License 2.0
211 stars 125 forks source link

Add support for gz.msgs.EntityWrench #572

Closed Vtn21 closed 5 days ago

Vtn21 commented 1 week ago

πŸŽ‰ New feature

Closes #566

Summary

Adds the new ros_gz_interfaces/msg/EntityWrench, with structure compatible with gz.msgs.EntityWrench. This enables the user to apply wrenches to Gazebo entities using ROS topics.

Also implements the ros_gz_bridge mapping between ros_gz_interfaces/msg/EntityWrench and gz.msgs.EntityWrench.

Test it

Manual testing involves spawning any entity in Gazebo and loading the gz::sim::systems::ApplyLinkWrench plugin to the world SDF. Then, call the ros_gz_bridge to expose the entity wrench topic as follows (YAML syntax):

- topic_name: "/world/<world_name>/wrench"
  ros_type_name: "ros_gz_interfaces/msg/EntityWrench"
  gz_type_name: "gz.msgs.EntityWrench"

Wrenches are then applied to selected entities using the "/world//wrench" topic.

Checklist

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

Vtn21 commented 5 days ago

Hi @ahcorde , sorry for my delay. While working on merging the PR with the base ros2 branch, I ended up forgetting to signoff a commit and things got messy. I opened another PR checking out directly from the ros2 branch which I believe is better now. Thanks for the support!