agent 手动编译,不用docker,以及树莓派上使用micros-agent的方法
-
@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似乎是少安装了什么,搜相关问题,按其不同方式做,均问化解,故在此请教,望版主抽空回复,谢谢!
-
@南京嵌入之梦
此问题已化解。
将ubuntu虚拟机重新安装,再一步步按照鱼香ROS的教程安装,虽说还是有点坎坷,但总算安装完成了,并且成功运行,可以接收到数据,只是不太圆满,遇到了新的问题,正常查找问题。我是参考这个帖子将 microros agnet 安装在本地的。
顺利完成教程中第一个 MicroROS节点,并运行。
目前运行的现象是:
不知道有人遇到过吗?盼指点!
-
小 小鱼 在 中 引用了 这个主题
-
@小鱼 鱼哥是不是用了树莓派,按照步骤来,把开发板弄成串行模式,然后雷达直接连树莓派,两个板子是不是都不用连WiFi了呀,只用树莓派连就行了
-
@苛性钠zzz 是的,你好聪明
-
此回复已被删除! -
@小鱼 小鱼,能启动microros_agent,都在一个WiFi下,ping的通也是udp模式,但是启动键盘控制后小车不会动是为什么啊,硬件也重新烧录了最新的,是不是PIO也要重新烧一下
micro ROS:
[1742892712.396319] debug | UDPv4AgentLinux.cpp | recv_message | [==>> UDP <<==] | client_key: 0x1007FDF9, len: 324, data:
0000: 81 01 05 07 01 3C 01 05 E4 00 15 A8 6E E2 67 00 60 E3 16 04 00 00 00 69 6D 75 00 00 00 00 A0
0020: E8 35 63 BF 00 00 00 80 28 C4 86 BF 00 00 00 A0 5D E3 BF 3F 00 00 00 60 AA BF EF 3F 00 00 00 00
0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0080: 00 00 00 00 00 00 00 40 36 65 06 C0 00 00 00 00 18 39 00 40 00 00 00 A0 3D 7E 1B C0 00 00 00 00
00A0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00C0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00E0: 00 00 00 00 00 00 00 80 ED 7C 66 BF 00 00 00 40 87 56 88 BF 00 00 00 00 14 55 F0 3F 00 00 00 00
0100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0120: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0140: 00 00 00 00ping小车ip:
orangepi@orangepi5plus:~$ ping 10.10.10.230
PING 10.10.10.230 (10.10.10.230) 56(84) bytes of data.
64 bytes from 10.10.10.230: icmp_seq=1 ttl=64 time=13.2 ms
64 bytes from 10.10.10.230: icmp_seq=2 ttl=64 time=6.53 ms
64 bytes from 10.10.10.230: icmp_seq=3 ttl=64 time=8.17 ms
64 bytes from 10.10.10.230: icmp_seq=4 ttl=64 time=8.73 ms
64 bytes from 10.10.10.230: icmp_seq=5 ttl=64 time=9.80 ms
64 bytes from 10.10.10.230: icmp_seq=6 ttl=64 time=5.36 ms
64 bytes from 10.10.10.230: icmp_seq=7 ttl=64 time=10.4 ms
64 bytes from 10.10.10.230: icmp_seq=8 ttl=64 time=6.55 ms
64 bytes from 10.10.10.230: icmp_seq=9 ttl=64 time=5.61 ms
64 bytes from 10.10.10.230: icmp_seq=10 ttl=64 time=13.5 ms
64 bytes from 10.10.10.230: icmp_seq=11 ttl=64 time=14.3 ms
64 bytes from 10.10.10.230: icmp_seq=12 ttl=64 time=11.0 ms
^C
--- 10.10.10.230 ping statistics ---
12 packets transmitted, 12 received, 0% packet loss, time 11019ms
rtt min/avg/max/mdev = 5.362/9.421/14.280/2.997 ms -
@小鱼 小鱼,能启动microros_agent,都在一个WiFi下,ping的通也是udp模式,但是启动键盘控制后小车不会动是为什么啊,硬件也重新烧录了最新的,是不是PIO也要重新烧一下
-
@2431039560 固件用的哪一个
-
@小鱼 最新V1.2.3的配置助手二驱板烧录的,具体是这个https://fishros.org.cn/forum/assets/uploads/files/1736172779188-fishbot_motion_control_v1.7.2.alpha.241229.bin
-
@2431039560 开关供电都正常吗,线连接是否正常,确认下控制命令是否发布出去了,比如开个新的终端订阅,小车的oled屏幕会不会闪烁
-
此回复已被删除! -
@小鱼 其他的好像都是正常的,然后cmd_vel发送出去了小车好像没收到,小车不会动,屏幕的线速度也都是0
-
@2431039560 agent用的docker版本的吗
-
@2431039560 有没有设置什么DOMAIN_ID
-
@小鱼 docker版本的好像下载不了,docker用一键安装以后get镜像那里出问题了,然后启动是这样的
拉镜像: Run CMD Task:[sudo docker pull ros:humble ] Error response from daemon: Get "https://registry-1.docker.io/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers) 启动不了: docker run -it --rm -v /dev:/dev -v /dev/shm:/dev/shm --privileged --net=host registry.cn-hangzhou.aliyuncs.com/fishros/micro-ros-agent:$ROS_DISTRO udp4 --port 8888 -v6 docker: permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Head "http://%2Fvar%2Frun%2Fdocker.sock/_ping": dial unix /var/run/docker.sock: connect: permission denied Run 'docker run --help' for more information
然后DOMAIN_ID设为了0,这里我看站内有树莓派的教程说默认是=0
-
此回复已被删除!