ROS2 errors on VOXL2
-
I installed ROS2 Foxy on my Voxl2 using the instructions
-sudo apt-get install voxl-ros2-foxy
-sudo apt-get install voxl-microdds-agent
-sudo apt-get install voxl-mpa-to-ros2
-voxl-configure-mpa-to-ros2
-source /opt/ros/foxy/setup.bash
-export ROS_HOME=/opt/ros/foxyAll seems to be okay but when I followed the ModalAI tutorial I get the following errors.
voxl2:/$ cd voxl2:~$ mkdir -p colcon_ws/src voxl2:~$ cd colcon_ws voxl2:~/colcon_ws$ cd src voxl2:~/colcon_ws/src$ git clone https://github.com/PX4/px4_ros_com --recursive Cloning into 'px4_ros_com'... remote: Enumerating objects: 2288, done. remote: Counting objects: 100% (162/162), done. remote: Compressing objects: 100% (47/47), done. remote: Total 2288 (delta 128), reused 115 (delta 115), pack-reused 2126 (from 1) Receiving objects: 100% (2288/2288), 608.87 KiB | 3.60 MiB/s, done. Resolving deltas: 100% (1455/1455), done. voxl2:~/colcon_ws/src$ git clone https://github.com/PX4/px4_msgs --recursive Cloning into 'px4_msgs'... remote: Enumerating objects: 3283, done. remote: Counting objects: 100% (1092/1092), done. remote: Compressing objects: 100% (268/268), done. remote: Total 3283 (delta 961), reused 829 (delta 822), pack-reused 2191 (from 3) Receiving objects: 100% (3283/3283), 607.13 KiB | 3.92 MiB/s, done. Resolving deltas: 100% (2005/2005), done. voxl2:~/colcon_ws/src$ cd ../ voxl2:~/colcon_ws$ colcon build Starting >>> px4_msgs --- stderr: px4_msgs CMake Error at /opt/ros/foxy/share/rosidl_adapter/cmake/rosidl_adapt_interfaces.cmake:60 (message): execute_process(/usr/bin/python3 -m rosidl_adapter --package-name px4_msgs --arguments-file /home/root/colcon_ws/build/px4_msgs/rosidl_adapter__arguments__px4_msgs.json --output-dir /home/root/colcon_ws/build/px4_msgs/rosidl_adapter/px4_msgs --output-file /home/root/colcon_ws/build/px4_msgs/rosidl_adapter/px4_msgs.idls) returned error code 1: AttributeError processing template 'msg.idl.em' Traceback (most recent call last): File "/opt/ros/foxy/lib/python3.6/site-packages/rosidl_adapter/resource/__init__.py", line 48, in evaluate_template _interpreter = em.Interpreter( AttributeError: module 'em' has no attribute 'Interpreter' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/usr/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/opt/ros/foxy/lib/python3.6/site-packages/rosidl_adapter/__main__.py", line 19, in <module> sys.exit(main()) File "/opt/ros/foxy/lib/python3.6/site-packages/rosidl_adapter/main.py", line 55, in main pathlib.Path(relative_path), output_dir) File "/opt/ros/foxy/lib/python3.6/site-packages/rosidl_adapter/__init__.py", line 20, in convert_to_idl package_dir, package_name, interface_file, output_dir / 'msg') File "/opt/ros/foxy/lib/python3.6/site-packages/rosidl_adapter/msg/__init__.py", line 39, in convert_msg_to_idl expand_template('msg.idl.em', data, output_file, encoding='iso-8859-1') File "/opt/ros/foxy/lib/python3.6/site-packages/rosidl_adapter/resource/__init__.py", line 23, in expand_template content = evaluate_template(template_name, data) File "/opt/ros/foxy/lib/python3.6/site-packages/rosidl_adapter/resource/__init__.py", line 69, in evaluate_template _interpreter.shutdown() AttributeError: 'NoneType' object has no attribute 'shutdown' Call Stack (most recent call first): /opt/ros/foxy/share/rosidl_cmake/cmake/rosidl_generate_interfaces.cmake:130 (rosidl_adapt_interfaces) CMakeLists.txt:28 (rosidl_generate_interfaces) --- Failed <<< px4_msgs [4.33s, exited with code 1] Summary: 0 packages finished [4.71s] 1 package failed: px4_msgs 1 package had stderr output: px4_msgs 1 package not processedNot sure what exactly here is causing the failure. Has anyone else had trouble building this tutorial?
-
@Gary-Holmgren said in ROS2 errors on VOXL2:
-source /opt/ros/foxy/setup.bash
Hey @Gary-Holmgren! So this is an issue with a conflict in the emPY library - it should have been updated in the most recent SDK release - however the solution programmatically is the following:
python3 -m pip uninstall -y empy
python3 -m pip install empy==3.3.4
scripts/voxl-configure-mpa-to-ros2 · dev · voxl / VOXL SDK / Utilities / voxl-mpa-to-ros2 · GitLab
GitLab.com
GitLab (gitlab.com)
Cheers!
Zach -
@Gary-Holmgren said in ROS2 errors on VOXL2:
-source /opt/ros/foxy/setup.bash
Hey @Gary-Holmgren! So this is an issue with a conflict in the emPY library - it should have been updated in the most recent SDK release - however the solution programmatically is the following:
python3 -m pip uninstall -y empy
python3 -m pip install empy==3.3.4
scripts/voxl-configure-mpa-to-ros2 · dev · voxl / VOXL SDK / Utilities / voxl-mpa-to-ros2 · GitLab
GitLab.com
GitLab (gitlab.com)
Cheers!
Zach@Zachary-Lowell-0 Yes this did the trick, thankyou!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login