-
Notifications
You must be signed in to change notification settings - Fork 516
TouchPlugin not updated #3417
Description
Environment
- OS Version: Ubuntu 24.04
- ROS Version: Jazzy
- gz-sim Version: 8.8.0 (Harmonic)
Description
I'm using a contact sensor correctly integrated in my legged robot URDF:
<gazebo reference="${prefix}_gripper_Link">
<sensor name="sensor_contact" type="contact">
<contact>
<collision>${prefix}_gripper_Link_collision_collision</collision>
</contact>
<always_on>1</always_on>
<update_rate>100</update_rate>
</sensor>
</gazebo>
<gazebo>
<plugin filename="gz-sim-touchplugin-system"
name="gz::sim::systems::TouchPlugin">
<target>ground_plane</target>
<namespace>${prefix}</namespace>
<time>0.01</time>
<enabled>true</enabled>
</plugin>
</gazebo>
--------- empty.world --------------
<plugin
filename="gz-sim-contact-system"
name="gz::sim::systems::Contact">
</plugin>
There is one contact sensor for each gripper, to estimate contact with ground plane.
This signal is published only once when the robot spawns and makes the first touch between ground and gripper, then it is never updated again...
I looked at the source code for TouchPlugin.cc and I see that there is no procedure of updating and republishing, after the first contact is registered it is deactivated.
- Expected behavior:
I expect a contact sensor to publish contact state with a certain frequency, with a false message if not touching, while true if touching.
Is there any other way to implement this with another Plugin?
I never implemented a plugin on my own, I tried to modify the TouchPlugin on my own to publish true/false with a given frequency but I don't know how to integrate it with my ROS2 project, especially, I don't know where to place the new .cc and .hh file and how to build it.
Please any tutorial and documentation easy to follow is very helpful.