Open fd3s1 opened 2 years ago
Failed <<< px4_ros_com [12.9s, exited with code 2]
Summary: 1 package finished [22.9s] 1 package failed: px4_ros_com 1 package had stderr output: px4_ros_com
c++: error: /home/sun2/px4_ros_com_ros2/build/px4_ros_com/src/micrortps_agent/microRTPS_agent.cpp: 没有那个文件或目录 (no such directory)
This error happens because fastrtpsgen does not work normally. For me, when I cd /path_to_ros2_ws/build/px4_ros_com
and execute make
, the console outputs
Generating micro-RTPS agent code... Failed to import genmsg: No module named 'genmsg'
So just install python3-genmsg by inputting
sudo apt-get install python3-genmsg
This works for me.
Besides, I uploaded my docker image to docker hub: https://hub.docker.com/r/lijinjie/px4-ros2-arm64 , which is verified on TX2 NX.
I hope this method can solve your problem :)
hi,
I think you haven't installed the extra requirements after installing ROS2 FOXY via Packages
.
link: https://docs.px4.io/master/en/ros/ros2_comm.html
Under Install ROS2
make sure you're java JDK is 11, and not 13 (installed automatically from PX4-Autopilot/Tools/Ubuntu.sh). Change the Ubuntu.sh file to only install 11.
This should solve all of your issues like missing microRTPS_agent folder
or Timesync_Publisher.cpp file unavailable
.
I,m using px4 and ros foxy in ubuntu20.04 I 'm struggling on it when I run ./build_ros2_workspace.bash --no_ros1_bridge --ros_distro foxy --ros_path ~/ros2_foxy/ros2-linux/setup.bash in terminal in the ~/px4_ros_com_ros2/src/px4_ros_com/scripts path, this mistake will happen. I'm sure I have the correct version of fast DDS(the default version in ros-foxy) and fastrtpsgen(1.0.4), but may JDK version is 13.0.7, is this the problem?