DavidPL1 / assembly_example

Example code for interaction with our assembly simulation ICRA 2023 challenge
7 stars 1 forks source link

ImportError for moveit_commander related to libgeometric_shapes.so #23

Closed abhishek47kashyap closed 1 year ago

abhishek47kashyap commented 1 year ago

On trying to import moveit_commander, I'm getting the following traceback:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/abhishek/Documents/vmc/vmc_icra_23/assembly_server/lib/python3/dist-packages/moveit_commander/__init__.py", line 4, in <module>
    from .move_group import *
  File "/home/abhishek/Documents/vmc/vmc_icra_23/assembly_server/lib/python3/dist-packages/moveit_commander/move_group.py", line 52, in <module>
    from moveit_ros_planning_interface import _moveit_move_group_interface
ImportError: libgeometric_shapes.so.0.7.3: cannot open shared object file: No such file or directory

I'm able to import successfully before sourcing the workspace but not after.

Any advice on how to overcome this would be appreciated.

Not sure if relevant info, but I'm finding the output of rospack find geometric_shapes to be /opt/ros/noetic/share/geometric_shapes both before and after sourcing my workspace.

DavidPL1 commented 1 year ago

That happens because the versions of the ROS package in the docker image and your local package differ. We build MoveIt from scratch to support its action servers working after time resets and it used libgeometric_shapes.so.0.7.3 to compile whereas you probably have version 0.7.5 installed locally.

Copying the workspace out of the docker image is a hack of sorts because you hope that the docker OS and your local system are similar enough for the transferred software to run without error. If you compile a docker image that extends the server image and install your software in there, these errors will not occur.

But since development is more convenient if you are able to run the extracted server workspace locally, I'll update the ROS base image and upload a compatible version as soon as possible.

abhishek47kashyap commented 1 year ago

Version 2.3 resolved this, thank you very much!