Robotics StackExchange | Archived questions

Unable to launch ros2_control due to missing 'Log' from 'rosgraph_msgs.msg'

Hello ROS2 Community: I am currently trying to using ROS2 Humble and include ros2_control functionalities in my code.

I am running my code with Ubuntu 22.04.2 LTS (Jammy) on an x86 laptop.

My code would operate fine whenever ros2control and the related controllers are not included, but whenever xacro files with ros2control included is launched the following error message will appear:

"Caught exception in launch (see debug for traceback): Caught exception when trying to load file of format [py]: substitution args not supported: cannot import name 'Log' from 'rosgraphmsgs.msg' (/opt/ros/humble/local/lib/python3.10/dist-packages/rosgraphmsgs/msg/init.py)"

The same error message would be outputted when the official ros2control demos (https://github.com/ros-controls/ros2control_demos) are ran on my platform.

I already tried reinstalling ROS2. python3 and all the related packages but it didn't seem to help.

Asked by Treeizard on 2023-05-25 21:49:34 UTC

Comments

Answers

This problem is actually resolved by re-downloading the ros - xacro

pip uninstall xacro sudo apt install ros-humble-xacro

Asked by Treeizard on 2023-05-26 00:47:55 UTC

Comments