Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Closed
joaomoura24 opened this issue Feb 17, 2023 · 6 comments
Closed

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

joaomoura24 opened this issue Feb 17, 2023 · 6 comments
Labels
invalid This doesn't seem right

Comments

@joaomoura24
Copy link
Collaborator

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'

@cmower
Copy link
Owner

cmower commented Feb 17, 2023

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.

@joaomoura24
Copy link
Collaborator Author

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

@cmower
Copy link
Owner

cmower commented Feb 17, 2023

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.

@cmower cmower mentioned this issue Feb 17, 2023
@cmower cmower added invalid This doesn't seem right and removed bug Something isn't working labels Feb 17, 2023
@cmower
Copy link
Owner

cmower commented Feb 17, 2023

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

@cmower
Copy link
Owner

cmower commented Feb 17, 2023

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.

@cmower
Copy link
Owner

cmower commented Feb 17, 2023

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

@cmower cmower closed this as completed Feb 17, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants