thank for your help! I implemented the code into the sdf-model and are able to listen to it via
rostopic echo /robot_bumper/states <img src="/uploads/default/original/1X/00dc558d62ec7a789b8ea1939d57a97254fdc003.png" width="690" height="421">
an example output is attached.
I tried to subscribe and print the sensor data with the following TF:
# Imported Python Transfer Function
@nrp.MapRobotSubscriber("collision2_name", Topic('/robot_bumper/states/collision2_name', gazebo_msgs.msg.ContactsState))
def read_sensor(t, collision2_name):
I checked the data format with the following command.
rosmsg show gazebo_msgs/ContactsState
I thought that I could print it directly, since collision2_name has the format string, but the output is:
<hbp_nrp_cle.robotsim.RosCommunicationAdapter.RosSubscribedTopic object at 0x7fe89d1c0410>
I assume that I either only get the address or missed a converting step. Am I subscribing the topic correct? Do you know what I missed?
With best regards,