# 串口 ros2 run micro_ros_agent micro_ros_agent serial --dev /dev/ttyUSB0
# UDP ros2 run micro_ros_agent micro_ros_agent udp4 --port 8888
# TCP ros2 run micro_ros_agent micro_ros_agent tcp4 --port 8888
# help ros2 run micro_ros_agent micro_ros_agent --help
4 烧录
1
ros2 run micro_ros_setup flash_firmware.sh
5 QA
4.1 colcon build 报错
若遇到下面问题.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
CMake Error at CMakeLists.txt:153 (find_package): By not providing "Findfastcdr.cmake"in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "fastcdr", but CMake did not find one.
Could not find a package configuration file provided by "fastcdr" (requested version 2) with any of the following names:
fastcdrConfig.cmake fastcdr-config.cmake
Add the installation prefix of "fastcdr" to CMAKE_PREFIX_PATH or set "fastcdr_DIR" to a directory containing one of the above files. If "fastcdr" provides a separate development package or SDK, be sure it has been installed.
1 2 3 4 5 6 7
git clone https://github.com/eProsima/fastcdr.git
cd fastcdr mkdir build && cd build cmake .. make -j$(nproc) sudo make install
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Starting >>> micro_ros_agent [Processing: micro_ros_agent] --- stderr: micro_ros_agent CMake Error at CMakeLists.txt:51 (find_package): By not providing "Findmicro_ros_msgs.cmake"in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "micro_ros_msgs", but CMake did not find one.
Could not find a package configuration file provided by "micro_ros_msgs" with any of the following names:
Add the installation prefix of "micro_ros_msgs" to CMAKE_PREFIX_PATH or set "micro_ros_msgs_DIR" to a directory containing one of the above files. If "micro_ros_msgs" provides a separate development package or SDK, be sure it has been installed.