RobotLocomotion / drake

Model-based design and verification for robotics.
https://drake.mit.edu
Other
3.27k stars 1.26k forks source link

Kinematic Floating Body and Multibody Movement #20496

Open WenlongLu opened 10 months ago

WenlongLu commented 10 months ago

Is your feature request related to a problem? Please describe. By kinematic body, I mean a body

  1. whose pose and twist are fully controlly by the user
  2. has infinite mass, and can interact with the rest of the dynamic world It is essentially a special static body with non-zero velocity.

A few examples where it can be used for:

  1. Model the environment, a conveyor belt, a moving truck, etc.
  2. Efficiently simulate a robot movement with controlled motion noise

Describe the solution you'd like Expand the function of Locking to lock velocity as well, not just treat velocity as zeros. Then, expose ports from MBP for users to set poses and spatial velocities.

Describe alternatives you've considered Lock + SetPoses after each time step. Velocity for contact solve would be wrong. Even for this, I need ports exposed to set poses.

WenlongLu commented 10 months ago

Another alternative would be control the bodies with infinitely high gain. @xuchenhan-tri mentioned, even for this, we need extra feature support from Drake.

@sherm1 @jwnimmer-tri fyi

amcastro-tri commented 10 months ago

Today we support infinite PD gains for 1-dof joints. So if all you wanted is to move your body in xyz, you'd need to create a body model with three prismatic joints. That of course requires the user to write a sligthly more complex SDF/URDF model, but it'd acchieve what you want.

How important (or not) is to prescribe rotations? Would it be an ok first step to only care about translations? FYI, APIs for PD controlled actuators are documented in the "Using PD controlled actuators" section of the MultibodyPlant docs. They are very simple to setup.

WenlongLu commented 10 months ago

Thank you for this suggestion! Xuchen mentioned the same thing. It does look theoretically the same as locking the velocities, right? I wonder why you would't suggest three prismatic joints + three revolute joints to prescribe full rigid motion?

amcastro-tri commented 10 months ago

I wonder why you would't suggest three prismatic joints + three revolute joints to prescribe full rigid motion?

That's defintiely doable. I tend to always implement the simplest thing that gets the job done. But if you also need rotations, your proposed solution with prsimatic and revloute joints should work.