New contact message for sensor_msgs

Hi!

This post will be about the proposal of a Contact.msg for the sensor_msgs package.

If you have any ideas for changes or usage, please share it in this post and send PR to my message-only package contact_msgs.

Motivation

I could not find simple message that defines whether there is contact between some defined sensor and other undefined object/objects. Messages like /ros_gz_interfaces/msg/Contact.msg are too complicated and simulator specific for simple contact detection. For contact sensor with force and torque readings geometry_msgs/WrenchStamped.msg would be enough.

Design / Implementation Considerations

# This is a message to hold data from simple contact

std_msgs/Header header      # timestamp is the time the contact was measured
                                        # frame_id is the location of the contact sensor


bool contact                # True if there is contact

Additional Information

I believe that this message could be used for creating future hardware interfaces and broadcasters for ros2_control framework. It also would be helpful for fields where contact sensors are widely used, such as legged robotics.

Links

Contact message repository
common_interfaces issue related to message
common_interfaces PR related to message
Old issue related to message

1 Like

Great. I subscribed to to issue and PR. As a good starter for the reference implementation, you could send a PR to Turtlebots. Versions 2 and 4 have bumpers AFAIK.