Robotics StackExchange | Archived questions

Collision between static models, or should I move to non-static? Can I force non-static model to be immovable?

Hello,

I am currently simulating my custom tandem one-armed wall-mounted pick-and-place robots in Gazebo. Currently they are static models <static>true</static> that know their position rotary encoders on the machine and I am simulating movement in gazebo by model_->GetJointController()->SetJointPosition(...). This means that I will not have collision information for these robots, since physics calculations are not run on static models. When I make my model non-static <static>false</static>, I can no longer move my joints using the method above, instead I use gazebo::common::PID and joint->SetForce(...) to move my machine around.

My issue is that I cannot both get collision data and directly control joint positions of my model. By the design of my robot, it is not stable and if I put it non-static, it will fall. Also the PID method is not preferable, and I would rather set positions directly. But, if I make my robot static, I cannot get collision data from it.

What is the best solution for this issue? Can I keep my model as static, but force the physics engine to calculate collision information? Can I put my model as non-static, but anchor the best to a certain position? Other solutions can be considered

Thank you for your help

Asked by ateator on 2020-09-29 10:30:21 UTC

Comments

Answers

This post is awaiting moderation as I answer but the solution I found was tho affix my robot to the world using a joint (fixed joints dont exist, so we put revolute limits at 0 to simulate fixed) in the SDF as follows

    <joint name='base_to_world' type='revolute'>
  <pose>0 0 0 0 0 0</pose>
  <parent>world</parent>
  <child>base_link</child>
  <axis>
    <xyz>0 0 1</xyz>
    <limit>
      <lower>0</lower>
      <upper>0</upper>
    </limit>        
  </axis>
</joint>    

And now I can treat my robot as non-static (dynamic) to get physics on it. I'm having trouble getting the joints to tthe correct positions now, but thats a separate issue ;)

Asked by ateator on 2020-09-29 16:15:22 UTC

Comments