cmower/optas

AttributeError: module 'xacro' has no attribute 'process'

joaomoura24 opened this issue · 6 comments

When running the simple_joint_space_planner.py example in the master branch i get the following error related with the xacro functionality:

Traceback (most recent call last): File "example/simple_joint_space_planner.py", line 138, in <module> main() File "example/simple_joint_space_planner.py", line 102, in main kuka = KukaLBR() File "/home/joao/Documents/Projects/test/optas/example/pybullet_api.py", line 168, in __init__ urdf_string = xacro.process(xacro_filename) AttributeError: module 'xacro' has no attribute 'process'

Ahh, I can reproduce this error. This is happening because you have ROS1 sourced and the xacro module is being imported from the ROS1 distribution packages - and I believe this is an older version of xacro. I have the updated version installed so works for me, but when I source ROS1, the old package is imported and I get the same failure.

I will look into how to resolve this issue in general.

Ok. Ideally this wouldn't depend on having ROS installed at all even.
Using some package for xacro that is available through pip.

Ok, this is a little more difficult than I thought. So, xacro can run in a ROS agnostic environment. However, "this implies that you cannot use ROS-specific features in xacro". We can look into modifying the med7 xacro file, but we should make a "Known issues" section in the README/documentation.

I changed the label for this issue from bug to invalid, since it is not a bug with optas.

011f77e is a small example of the things that need to be removed from the xacro file so it can be loaded in a ROS agnostic environment.

Closing, this will be resolved when #79 is merged.