abr / abr_control

Robotic arm control in Python
Other
416 stars 99 forks source link

Mujoco install issues I encountered. #99

Closed jeanbuntu closed 2 years ago

jeanbuntu commented 2 years ago

For starters, I did not use conda. I worked with pip install git+https://github.com/abr/abr_control

This installs the repo in your python package location.

Issue 1. That method does not automatically pull the robot XML files in the arms folder(At least for me). So whichever arm you want, I came here(to the repo) and copied the XML file into the respective arm folder in your system.

Issue 2. When working with Mujoco, the demo files initially gave out an error for me saying AttributeError: 'MjViewer' object has no attribute 'exit'

This can be quickly fixed with commenting out the following lines of code. if interface.viewer.exit: glfw.destroy_window(interface.viewer.window) break

I'm not sure if the above is the best solution, but it works.

Issue 3. this repo doesn't seem to have the end effectors for anything but the jaco2, but how do we manipulate the EE? And is there anywhere we can find existing XML files for UR5 End effectors?

p3jawors commented 2 years ago

Hey, thanks for checking out the repo.

Issue1: if you clone the repository and follow the install instructions on the readme you'll have the xml files.

Issue2: This is because we have created a fork of mujoco to add a conditional exit. If you follow our steps for installing mujoco here you'll have the function that's missing.

Issue3: You have a few steps you'll need to do to get controllable manipulators. 1) You'll need the stl files for the manipulator to add to the xml files. A cursory google search comes up with some implementations of this, so you may be able to incorporate parts of them.

2) You'll need to update the xml config to include the finger joints. If you can find a ur5 implementation for mujoco this should handle steps 1 and 2 for you.

3) Right now the OSC deals with the arm joints. You'll need to create an additional controller, or expand the ones we have, that can add your desired control signal for opening and closing the gripper. Depending on what you're trying to do you can just have an open and close command. In the abr_jaco2 repo we have an implementation for the real jaco2 arm. In this case we used the xyz_offset parameter in osc.generate() here to add an offset from the last joint ot the finger tips. Then we use a simple open and close command that is sent to the manipulator. Nothing fancy with force control because it lacks the sensors, so just a binary open/close step.

If you end up adding the manipulator implementation, feel free to make a PR for it and we can review when we have the cycles.

Cheers

p3jawors commented 2 years ago

Closing due to inactivity.