Skip to content
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

contact task simulation issues with gazebo and ROS #33

Open
jacknlliu opened this issue Mar 13, 2018 · 4 comments
Open

contact task simulation issues with gazebo and ROS #33

jacknlliu opened this issue Mar 13, 2018 · 4 comments

Comments

@jacknlliu
Copy link
Owner

jacknlliu commented Mar 13, 2018

  • physics engine in gazebo for contact simulation
    dart with contact dynamic model

  • exact joint and link state feedback after contact
    /joint_states will provide wrong data which is very large and exceeds the joint limit after the robot has a collision with an object in gazebo, see reset /joint_states and gazebo plugins state in gazebo  #27 and wrong and very large joint position after robot had a collision with objects.

  • joint velocity or force controller which needs controller with gravity compensation(gazebo is working on general gravity compensation)

  • reset

    • correctly reset ros controllers (plugin) for gazebo (with or without reset time)
    • correctly reset gazebo without reset time!( We need continuous time for ros controllers)
    • correctly reset gazebo with world state and some models state
    • (optional) correctly reset gazebo with link velocity or force

Reference

@jacknlliu jacknlliu changed the title contact task simulation issues with gazebo contact task simulation issues with gazebo and ROS Mar 13, 2018
@jacknlliu
Copy link
Owner Author

jacknlliu commented Mar 15, 2018

For /joint_states published by joint_state_publisher which providing wrong data after contact, we can use gazebo plugin joint_state_publisher .

For using gazebo plugin joint_state_publisher, we should add the following lines to your URDF

  <gazebo>
      <plugin name="gazebo_joint_state_publisher" filename="libgazebo_ros_joint_state_publisher.so">
        <robotNamespace></robotNamespace>
        <updateRate>200.0</updateRate>
        <jointName>elbow_joint, shoulder_pan_joint, shoulder_lift_joint, wrist_1_joint, wrist_2_joint, wrist_3_joint</jointName>
      </plugin>
  </gazebo>

NOTE: it seems can't get the velocity correctly from universal_robot, and it only gets the should_pan_joint velocity, others are all zero. But it can get the velocity correctly from iiwa robot. It is very strange!

Some useful things to deep into joint state controller issue, see namespaceangles, /joint_states from joint state controller and gazebo plugin joint state publisher.

@jacknlliu
Copy link
Owner Author

jacknlliu commented Mar 27, 2018

We have three main issues in this process:

  • reset ros controllers failed/ /gazebo/set_model_config failed with gazebo ros simulation hardware interface.
  • compile gazebo9 with dart from source, but when compile failed with gazebo_ros_pkgs
  • dart physics engine can't work with ros controllers in gazebo9

@jacknlliu
Copy link
Owner Author

jacknlliu commented Apr 5, 2018

Physics engine will give a very large force(impulse) when robot end-effector has a collision with some fixed object, the magnitude of the force is about 1e4 (also can reference to [1]).

And the contact force will keep vibrating when has collisions, and it is not realistic in the real physical world.

We should solve the contact impulse issue if we want to simulate the contact and make the learned policies more robust.

Some tricks to solve this, for example

  • when contact occurs (a contact signal should be got), reset the force as 0.
  • and using F_render = k * F_sim, where k from 0 increasing to 1 along with the update time.
  • using mujoco model-based method

Reference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant