Open osrf-migration opened 11 years ago
Original comment by John Hsu (Bitbucket: hsu, GitHub: hsu).
Updated ros-pkg ticket.
Proposing making sure Link::SetForce
, Link::SetTorque
, Link::AddForce
and Link::AddTorque
) sets/accumulates force/torque at Link
origins, I agree that seem to be more intuitive. Objections?
When settled, I'll update doxygen comment to be more clear on what's going on as well.
Thanks, John
Original comment by Nate Koenig (Bitbucket: Nathan Koenig).
Until 2.0
Original comment by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).
After trying out all the functions, I think their documentation should be something like this:
/// \brief Apply a force at the link's CoG for one time step.
/// \param[in] _force Force expressed in the world frame.
public: virtual void AddForce(const math::Vector3 &_force) = 0;
/// \brief Apply a force at the link's CoG for one time step.
/// \param[in] _force Force expressed in the link's frame (not its
/// inertial frame).
public: virtual void AddRelativeForce(const math::Vector3 &_force) = 0;
/// \brief Apply a force at a given position for one time step.
/// \param[in] _force Force expressed in the world frame.
/// \param[in] _pos Position expressed in the world frame.
public: virtual void AddForceAtWorldPosition(const math::Vector3 &_force,
const math::Vector3 &_pos) = 0;
/// \brief Apply a force at a given position for one time step.
/// Note that force and position are expressed in different frames.
/// \param[in] _force Force expressed in the world frame.
/// \param[in] _pos Position expressed in the link's frame (not its
/// inertial frame).
public: virtual void AddForceAtRelativePosition(
const math::Vector3 &_force,
const math::Vector3 &_relPos) = 0;
Original comment by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).
If I may add a couple of functions which would be nice to have for the force/torque GUI, something like:
/// \brief Apply an impulse to the body.
/// \param[in] _force Force value in N.
/// \param[in] _time Time interval in s.
public: virtual void ApplyImpulse(const math::Vector3 &_force, const double &_time) = 0;
Ns
, but I think separating force and time is friendlier. /// \brief Add a persistent force to the body.
/// \param[in] _force Force value in N.
public: virtual void AddPersistentForce(const math::Vector3 &_force) = 0;
SetForce(0)
Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).
Original report (archived issue) by Johannes Meyer (Bitbucket: johmeyer).
I posted this issue a while ago in the old Trac system on code.ros.org (see here). As there was no reaction until now and it does not only affect the simulator_gazebo package for ROS, I repost it here:
Note that dBodyAddForceAtRelPos() also adds forces relative to the center of mass, too, not relative to the origin of the body.