-
Notifications
You must be signed in to change notification settings - Fork 6
Collision Message Proposal #2
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
base: main
Are you sure you want to change the base?
Conversation
I suggest renaming to I'm personally quite sad that Gazebo doesn't allow reporting whole contacting (sub)surfaces but only points (for tracked vehicles, it would be great). But I don't know of any good representation. The area might get quite complicated. I see three ways:
Contact positions and normals are definitely needed for this message to be useful to a wider audience. Penetration depth wouldn't hurt, but I won't advocate for it. The forces could be nice for some applications. But they could also be left out for something like contact sensors.
I hope
|
The Although I see the need to standardize formats and to make them working across different simulators, I do not see the link of the proposed collision messages with the rest of the content of this repository. On the other hand, I cannot think of a better spot for such messages either. Maybe a new package, called If the community decides to keep the proposed messages within this repository, I believe the |
Can you explain the difference in Gazebo?
I'll concede that broadly that is how the package is currently designed, but I don't think that's a requirement.
I don't love it, but in ROS 2 there has been a transition from naming things As a broader note, I'm coming at this from a navigation perspective. I just want to know if my stupid navigation algorithms have driven the robot into a box or not. But also, as someone who has worked to add ROS simulation interfaces to a simulator, I think there should be ways to report less. I don't even want to think about the logic that would be required for getting a full contact surface. |
Gazebo has:
|
I did not know that, thank you for this comment. As mentioned earlier, I agree with the need to standardize interfaces between simulators, but I am not convinced we should push all possible interfaces to one package. |
My thoughts:
How about making things more dynamic?
If you like the general idea, I am open to suggestions about this service. Then, you get a topic with the collision data. This can be implemented though a dynamic component / plugin, so that the simulation scene designer is not responsible for determining which collisions are interesting, but rather leaves that to test scenario developer. I think this would be better. |
I would keep things simple:
I don't think adding extra services for filtering is necessary. Don’t get me wrong - it’s not completely off the table, but I would be cautious about anything that might be seen as "forcing a design." Filtering can take place at multiple levels (engine, components, and end-user), and I wouldn't be happy if I were forced (or "strongly advised" 😄) to call multiple additional services and add several subscribers just to track the collisions I care about. |
You can still add components like collision/contact sensor the old way if you wish. This is a runtime option - because I believe it is increasingly useful to have dynamic API suitable for scenario testing (as in, not necessarily having to craft a new scene / rebuild for new scenario). Also, the service can be called with the same topic for any number of entities and you will need just one subscription to handle it, if this is your preference. |
I agree in general that publishing all contacts is not always a good idea. But I'd vouch for having an easy way to enable reporting of all contacts. I can also imagine the request would profit from having an entity filter instead of just a single entity. I'm not sure how easy it is to write an all-matching filter, but maybe that would be a way to easily enabling the reporting of all contacts? Also, some simulators could have different ways of enabling the reporting, e.g. config variables. That could solve @pijaro 's problem. Just to be sure we all understand it the same way: for a contact to be reported, is it sufficient if reporting of contacts of one of the colliding bodies is enabled? Or do both need to be enabled? |
One body enabled is enough. I believe there is a reason to make this more powerful by enabling specifying pairs or sets / collision layers etc. in the long run.
I agree that registering multiple entities for watching could be useful, either through a list (could be obtained by filtering in a Get* call) or through a filter directly. I could introduce this as a proposed change if that's ok. I will work my way to a PR tomorrow. |
I have wanted a collision reporting scheme that could work across multiple simulators.
We have
gazebo_ros_pkgs/ContactState.msg
(andContactsState
) which containedinfo
geometry_msgs/Wrench[]
for enumerating forces/torquesWrench
for the total force/torqueVector3[]
contact positionsVector3[]
contact normals (presumably the same size as positions)float64[] depths
- Penetration depthsI boiled it down to a non-simulation specific pair of messages in collision_log_msgs/NamedCollision.msg which stripped it down to the two names.
There is also moveit_msgs/ContactInformation.msg which has
Point
positionVector3
normalfloat64 depth
Example
Consider this scenario:
We have four entities. At the time depicted, it might show
Considerations
entity0 == entity1
, i.e. detect if the arm was in self collision