小鱼 ROS 2 新书上线!点击链接查看, 新书配套视频点击链接查看。
提问前必看的发帖注意事项—— 提问前必看!不符合要求的问题拒绝回答!!
社区使用指南—如何添加标签修改密码
agent 手动编译,不用docker,以及树莓派上使用micros-agent的方法
-
手动编译agent成功,运行时提示
Package 'micro_ros_agent' not found
-
@15724948 已经好了,环境变量问题
多运行一条指定环境变量的指令, source /home/用户名/microros_ws/install/local_setup.bash -
此回复已被删除! -
-
@yjjsnles 楼主解决了吗,是什么原因啊
-
标题:树莓派4B作上位机建图失败
问题描述:
我是把树莓派4B当作上位机来控制小车,都是用串口进行通信,树莓派的系统是Ubuntu22.04,ros2是humble版本,将四驱主控板和雷达转接板驱动配置好后,进行建图时失败。
具体细节和上下文:
- 雷达刚开始正常运行:
- 运行ros2 run micro_ros_agent micro_ros_agent serial -b 921600 --dev /dev/ttyUSB0 -v6后
单独进行键盘操控时也正常
所以我认为应该是供电不足问题,我该怎么解决。
- 雷达刚开始正常运行:
-
@2216200358
补充说明:
在运行建图过程中,雷达过几秒中会出现突然降速的情况,并出现以下错误。
-
@2216200358 拍下雷达板,en跳线冒有拔掉吗
-
@小鱼
没有拔 -
@2216200358 拔掉试试,另外雷达现在的供电怎么走的
-
@小鱼 拔掉也不行,还是那样。
-
@小鱼 四驱板和雷达运行成功啦,是因为端口号没换,应该是ttyUSB0和ttyUSB1。
运行ros2 launch slam_toolbox online_async_launch.py后,没弹出rviz,这好像不对吧,我重启试一下。
-
@2216200358 没弹窗正常的,slamtoolbox本身没界面
-
编译通过不了
-
@1976933473 遇到同样的问题,不知道怎么解决
-
@1976933473 看看系统版本对不对
-
@1772009366
我重新安装了ubuntu22.04,再下载ros2-humble,可以正常运行agent了 -
@小鱼
哥,请问有什么办法提高micro-ros与ROS2之间的通信速度不
1,想过提高串口连接agent的波特率,但是波特率超过921600 ,agent就不工作了(查阅资料显示esp32s3最高波特率可以达到4500000),请问有办法提高连接agent的波特率不2,请问使esp32s3运行micro-ros可以通过网线连接agent不
-
@1976933473 走网线
-
按此操作,在最后一步(colcon build)出现问题:
dq@dq-virtual-machine:~/Desktop/microros_ws$ colcon build
Starting >>> micro_ros_msgs
Finished <<< micro_ros_msgs [17.1s]
Starting >>> micro_ros_agent
[Processing: micro_ros_agent]
[Processing: micro_ros_agent]
[Processing: micro_ros_agent]
[Processing: micro_ros_agent]
[Processing: micro_ros_agent]
[Processing: micro_ros_agent]
--- stderr: micro_ros_agent
Cloning into 'xrceagent'...
Switched to a new branch 'ros2'
HEAD is now at c25243c Enable Domain Override on Reference and XML Participant (#351)
CMake Warning (dev) at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
The package name passed tofind_package_handle_standard_args
(tinyxml2)
does not match the name of the calling package (TinyXML2). This can lead
to problems in calling code that expectsfind_package
result variables
(e.g.,_FOUND
) to follow a certain pattern.
Call Stack (most recent call first):
cmake/modules/FindTinyXML2.cmake:40 (find_package_handle_standard_args)
/opt/ros/humble/share/fastrtps/cmake/fastrtps-config.cmake:51 (find_package)
CMakeLists.txt:153 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.In file included from /home/dq/Desktop/microros_ws/src/micro-ROS-Agent/micro_ros_agent/src/main.cpp:15:
/home/dq/Desktop/microros_ws/src/micro-ROS-Agent/micro_ros_agent/include/agent/Agent.hpp:18:10: fatal error: uxr/agent/AgentInstance.hpp: No such file or directory
18 | #include <uxr/agent/AgentInstance.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
gmake[5]: *** [CMakeFiles/micro_ros_agent.dir/build.make:76: CMakeFiles/micro_ros_agent.dir/src/main.cpp.o] Error 1
gmake[4]: *** [CMakeFiles/Makefile2:137: CMakeFiles/micro_ros_agent.dir/all] Error 2
gmake[3]: *** [Makefile:146: all] Error 2
gmake[2]: *** [CMakeFiles/micro_ros_agent.dir/build.make:86: micro_ros_agent-prefix/src/micro_ros_agent-stamp/micro_ros_agent-build] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:111: CMakeFiles/micro_ros_agent.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2Failed <<< micro_ros_agent [3min 26s, exited with code 2]
Summary: 1 package finished [3min 44s]
1 package failed: micro_ros_agent
1 package had stderr output: micro_ros_agent问题出在哪里?
系统是 ubuntu 22.04 虚拟机(VMware),一键安装的 ROS2(humble)。
开始用 docker 试过,也不成功。盼指点……
谢谢! -
@小鱼
我在 unbuntu22.04 虚拟机上参考此方式安装 MicroRos Agent,编译失败直接用您的一键安装 ROS2 ,已正常运行,现在想和单片机通讯,按照文章先尝试了 Docker 模式,提示 MicroROS agent 没有找到,担心是外网问题,看到有直接安装在本地运行的方式,便参照实施。
前几步均正常,到编译(colcon build)这一步时,出错,尝试了很多方式,最终现象停留在:
dq@dq-virtual-machine:~/Desktop$ cd microros_ws
dq@dq-virtual-machine:~/Desktop/microros_ws$ colcon build
Starting >>> micro_ros_msgs
Finished <<< micro_ros_msgs [1.67s]
Starting >>> micro_ros_agent
--- stderr: micro_ros_agent
In file included from /home/dq/Desktop/microros_ws/src/micro-ROS-Agent/micro_ros_agent/src/agent/Agent.cpp:18:
/home/dq/Desktop/microros_ws/src/micro-ROS-Agent/micro_ros_agent/include/agent/Agent.hpp:18:10: fatal error: uxr/agent/AgentInstance.hpp: No such file or directory
18 | #include <uxr/agent/AgentInstance.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from /home/dq/Desktop/microros_ws/src/micro-ROS-Agent/micro_ros_agent/src/main.cpp:15:
/home/dq/Desktop/microros_ws/src/micro-ROS-Agent/micro_ros_agent/include/agent/Agent.hpp:18:10: fatal error: uxr/agent/AgentInstance.hpp: No such file or directory
18 | #include <uxr/agent/AgentInstance.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
gmake[2]: *** [CMakeFiles/micro_ros_agent.dir/build.make:76: CMakeFiles/micro_ros_agent.dir/src/main.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
gmake[2]: *** [CMakeFiles/micro_ros_agent.dir/build.make:90: CMakeFiles/micro_ros_agent.dir/src/agent/Agent.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:137: CMakeFiles/micro_ros_agent.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2Failed <<< micro_ros_agent [0.28s, exited with code 2]
Summary: 1 package finished [2.47s]
1 package failed: micro_ros_agent
1 package had stderr output: micro_ros_agent似乎是少安装了什么,搜相关问题,按其不同方式做,均问化解,故在此请教,望版主抽空回复,谢谢!