Gazebo | Ignition | Community
Ask Your Question

How to know the vector of force when my model collides a wall

asked 2019-05-22 02:59:36 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I want to make a simulation in Gazebo about what will happen when a satellite hit an irregular objection like a comet in space. I used the "spacedyn" in MATLAB to calculate the dynamics of satellite. But "spacedyn" needs to know the force when satellite hit the objection. I don't know how to get the force from Gazebo. However, it seems like that Gazebo won't return the collision force.

edit retag flag offensive close merge delete


There is a function in Gazebo API that gives you a vector of the force applied to the link.

kumpakri gravatar imagekumpakri ( 2019-05-24 10:01:25 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2019-05-24 02:48:06 -0500

I think you can use a Contact Sensor for this. You could attach it either to your satellite or your colliding object model. You might have to write a dedicated plugin depending on what your use case is, but this sensor returns Contact informations, which include the 2 collisions implied in the contact and the force that gets applied at the point of contact. This tutorial explains more about the contact sensor and how to write a plugin for it Cheers

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2019-05-22 02:59:36 -0500

Seen: 465 times

Last updated: May 22 '19