facebookresearch / fairo

A modular embodied agent architecture and platform for building embodied agents
MIT License
852 stars 92 forks source link

Robot Model Not Working #1400

Open AlexanderKhazatsky opened 1 year ago

AlexanderKhazatsky commented 1 year ago

Hello! I am using a franka with the robotiq gripper mounted on. Because of this, I would like to use robot_model=franka_panda_robotiq_85.

However, when I try to do this I get the following error. Any help would be much appreciated :)

2022-12-06 16:20:11,063][polymetis.robot_client.executable_robot_client][INFO] - === Executing client at /home/sasha/fairo/polymetis/polymetis/build/franka_panda_client === Using 20MB as stack size Using 80 as real-time thread priority Using 0 as cpu_dma_latency Disabled sbrk... Disabled mmap... Locked memory... Initialized pthread... Finished setting stacksize... Finished setting scheduling policy & priority... Creating thread... Started realtime thread. [2022-12-06 16:20:11.100] [info] ==== Initializing new RobotClient... ==== franka_panda_client: /home/sasha/fairo/polymetis/polymetis/src/clients/franka_panda_client/franka_panda_client.cpp:44: FrankaTorqueControlClient::FrankaTorqueControlClient(std::shared_ptr, YAML::Node): Assertion `status.ok()' failed. Traceback (most recent call last): File "/home/sasha/fairo/polymetis/polymetis/python/scripts/launch_robot.py", line 84, in main client.run() File "/home/sasha/fairo/polymetis/polymetis/python/polymetis/robot_client/executable_robot_client.py", line 78, in run subprocess.run( File "/home/sasha/anaconda3/envs/polymetis-local/lib/python3.8/subprocess.py", line 512, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['sudo', 'env', '"PATH=$PATH"', '/home/sasha/fairo/polymetis/polymetis/build/franka_panda_client', '/tmp/tmp48smwj61']' died with <Signals.SIGABRT: 6>.

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace. [2022-12-06 16:20:11,319][main][INFO] - Using sudo to kill subprocess with pid 9086, pgid 9086...

AlexanderKhazatsky commented 1 year ago

Gentle bump about this. We are starting data collection this week and would love to have this fixed before beginning :)

exhaustin commented 1 year ago

Hi @AlexanderKhazatsky! Terribly sorry I am currently remote and thus won't be able to debug this soon. However, I think this hack will probably work:

  1. Take panda_robotiq_85.urdf and modify all robotiq joints to be of type "fixed".
  2. Instead of using robot_model=franka_panda_robotiq_85, try robot_model.robot_description_path=path/to/the/urdf/in/the/above/step

This way, you won't confuse the controllers with extra degrees of freedoms, while getting an accurate robot model that accounts for the dynamics induced by the robotiq gripper.

AlexanderKhazatsky commented 1 year ago

Thanks! I'm also remote and haven't been able to try this, but I did noice an error caused by the fact that the URDF assumes that the following mesh exists: meshes/robotiq-2f/collision/base.stl

However when I look in the folder, it doesn't seem to be there. Is this the case on your end as well?

AlexanderKhazatsky commented 1 year ago

Hello! I was wondering if a more permanent fix could be pushed for this at some point :)

exhaustin commented 1 year ago

We simlink polymetis/data/franka_panda_robotiq_85/meshes/robotiq-2f to polymetis/data/kuka_iiwa/meshes/robotiq-2f/collision/base.stl, so it should be there. If your able to view your local files, can you cd into polymetis/data/kuka_iiwa/meshes/robotiq-2f to see if the symlink is working properly?