Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TouchPlugin not updated #3417

Open
AlePuglisi opened this issue Jan 21, 2025 · 0 comments
Open

TouchPlugin not updated #3417

AlePuglisi opened this issue Jan 21, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@AlePuglisi
Copy link

AlePuglisi commented Jan 21, 2025

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.

@AlePuglisi AlePuglisi added the bug Something isn't working label Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant