mitchellspryn / UrdfSim

Other
104 stars 25 forks source link

Issue controlling gripper in RobotArm.xml #24

Closed huckl3b3rry87 closed 4 years ago

huckl3b3rry87 commented 4 years ago

I am trying to control the manipulator to open or close using functionality from ArmClientTest.py i.e.,

print('Closing claw')
client.set_manipulator(0)

or

print('Opening claw')
client.set_manipulator(1)

But it is not moving the manipulator arms. A

I am able to use the PythonClient to move the URDF around to a random pose.

Q1: Any thoughts?

Q2: Eventually, I would like to be able to grab this cup (or some object) and move it around. Is this easily done once I can grab the cup?

Thank you!

huckl3b3rry87 commented 4 years ago

Also, I went back to the default URDF for this robot ( I had modified a couple things), but I am still getting the issue Capture

huckl3b3rry87 commented 4 years ago

It seems to be an issue with the prismatic joint, if I change

  <joint name="manipulator_base_to_right_manipulator" type="prismatic">
    <parent link="manipulator_base"/>
    <child link="right_manipulator"/>
    <origin rpy="0 0 0" xyz="0 -0.085 0.065"/>
    <axis rpy="0 0 0" xyz="0 -1 0"/>
    <limit lower="-0.070" upper="0" effort="10000" velocity="0.2"/>
  </joint>

to

  <joint name="manipulator_base_to_right_manipulator" type="revolute">
    <parent link="manipulator_base"/>
    <child link="right_manipulator"/>
    <origin rpy="0 0 0" xyz="0 -0.085 0.065"/>
    <axis rpy="0 0 0" xyz="1 0 0"/>
    <limit lower="-1.57079" upper="1.57079" effort="10000" velocity="0.2"/>
  </joint>

then, when the simulation starts, it looks like this A

then sending

 client.set_manipulator(0)

rotates the right claw as

B

@mitchellspryn can you please see if the default URDF and client can work to close the gripper?

huckl3b3rry87 commented 4 years ago

Q2: Eventually, I would like to be able to grab this cup (or some object) and move it around. Is this easily done once I can grab the cup?

A2: Yes

mitchellspryn commented 4 years ago

This is truely bizarre. I tried it on my box just now. Everything seems to work as I would expect it to. A thought - did you rotate the playerstart from 0 degrees?

huckl3b3rry87 commented 4 years ago

Just started from a fresh setup and the gripper is closing!

I did not test the rotate playerstart in this new version; if I have future issues with this, I will comment here

Thanks!