小鱼 ROS 2 新书上线!点击链接查看, 新书配套视频点击链接查看。
提问前必看的发帖注意事项—— 提问前必看!不符合要求的问题拒绝回答!!
社区使用指南—如何添加标签修改密码
[FishBot教程]7. FishBot-Nav2导航测试
-
@小鱼
显示图像之后用2D Pose Estimate 选方向之后没有反映,而且全局代价地图和激光地图没有出现
雷达驱动还出现这个警告:
-
请单独发帖
@小鱼 在 提问前必看!一定要看!必须看一下! 中说:
问题一定要描述清楚,终端打印一定复制粘贴,方便回答者检索和引用(你可以在linux系统上打开浏览器进社区)
基本的Markdown语法一定要学习下,有的小伙伴图片代码一团糟
提问时一定要提供尽可能多的信息(系统版本,ROS版本,前后操作,终端日志),包括你的目的,比如你其实想装装某个库遇到问题,不要只说这个问题,因为可能有更好的替代方案
先搜索再提问,很多问题其实都有解决方案,确保你自己对自己的问题有一定了解再提问
尽量一句话说完,不要把社区当微信聊天一样用,每一个回复都尽量提供更多的的信息。 -
@小鱼 鱼哥在构建完地图导航测试时遇到了一点问题,问题如下:
平台:Ubuntu20.04 ROS:FOXY 小车:fishbot四驱
问题:地图成功构建好后,按照教程加载到navigation2.launch.py程序中去,编译成功,然后运行后,按照问档设置起点和目标点,无法使小车导航移动。具体操作步骤和执行状态如下:
1、启动micro-ros命令:
sudo docker run -it --rm -v /dev:/dev -v /dev/shm:/dev/shm --privileged --net=host microros/micro-ros-agent:$ROS_DISTRO udp4 --port 8888 -v6
状态正常,可以接收到话题
2、启动雷达驱动:
xhost + && sudo docker run -it --rm -v /dev:/dev -v /dev/shm:/dev/shm --privileged -v /tmp/.X11-unix:/tmp/.X11-unix --device /dev/snd -e DISPLAY=unix$DISPLAY -p 8889:8888 fishros2/fishbot_laser
在新开的RVIZ中可以看到雷达正常工作。
3、修改navigation2.launch.py程序,加载新建的地图
4、运行程序,加载地图如下
5、设置2D Pose Estimate 和 nav2 goal提示错误:
[amcl-2] [INFO] [1686665863.510768999] [amcl_rclcpp_node]: Message Filter dropping message: frame 'laser_frame' at time 1686665862.260 for reason 'Unknown'
[rviz2-10] [INFO] [1686665863.524613593] [rviz2]: Message Filter dropping message: frame 'laser_frame' at time 1686665862.260 for reason 'Unknown'
[amcl-2] [INFO] [1686665863.635999865] [amcl_rclcpp_node]: Message Filter dropping message: frame 'laser_frame' at time 1686665862.386 for reason 'Unknown'
[rviz2-10] [INFO] [1686665863.652530977] [rviz2]: Message Filter dropping message: frame 'laser_frame' at time 1686665862.386 for reason 'Unknown'
不知道问题出在了哪里? -
@1250372262 你好,你这个我问题解决了吗,我的也是地图可以加载,但2D Pose Estimate没有反应,也不能导航。
-
此回复已被删除! -
-
@小鱼 鱼哥想问一下,为什么一定是humble版本,是因为下位机小车程序的与原因,还是上位机程序的原因,具体是哪里导致这个错误,能详细述说吗?麻烦了鱼哥。
-
@2918095496 foxy版本已经EOL了,主要原因是NAV2这块不同版本之间有差异,我只配置了humble版本的,具体你需要详细了解下nav2才行
-
@小鱼 鱼哥,我已经把版本换成Ubuntu22.04和humble版本了。但是存在以下问题:
1、在Ubuntu22.04中使用Fishbot配置工具时,检测不到设备端口。如下图
2、我试着用Ubuntu20.04是可以检测到端口的,然后按Ubuntu22.04中服务IP进行配制,在Ubuntu22.04中,agent无法接收到小车这边的信息。我想是不是配置还是需要在对应的版本上进行配置。(问题2只是我应对问题1的一个尝试)
希望鱼哥能提供帮助。 -
@2918095496 在 [FishBot教程]7. FishBot-Nav2导航测试 中说:
@小鱼 鱼哥,我已经把版本换成Ubuntu22.04和humble版本了。但是存在以下问题:
1、在Ubuntu22.04中使用Fishbot配置工具时,检测不到设备端口。如下图
2、我试着用Ubuntu20.04是可以检测到端口的,然后按Ubuntu22.04中服务IP进行配制,在Ubuntu22.04中,agent无法接收到小车这边的信息。我想是不是配置还是需要在对应的版本上进行配置。(问题2只是我应对问题1的一个尝试)
希望鱼哥能提供帮助。根据鱼哥的一个方案解决了这个问题链接文本
-
@小鱼 我这边遇到的问题是:当我启动导航控制节点完之后,也点击了初始化定位状态位置,然后一直没加载出来相关的全局代价地图以及被地代价地图以及激光在地图上标记的数据。这是什么原因呢?
-
编译出错鱼哥。这是为啥 -
@2496480233 解决了吗我也是这个编译出错
-
@1954923637 代码版本看看有没有错,最好带着上下文重新发个帖子。
@小鱼 在 提问前必看!一定要看!必须看一下! 中说:
问题一定要描述清楚,终端打印一定复制粘贴,方便回答者检索和引用(你可以在linux系统上打开浏览器进社区)
基本的Markdown语法一定要学习下,有的小伙伴图片代码一团糟
提问时一定要提供尽可能多的信息(系统版本,ROS版本,前后操作,终端日志),包括你的目的,比如你其实想装装某个库遇到问题,不要只说这个问题,因为可能有更好的替代方案
先搜索再提问,很多问题其实都有解决方案,确保你自己对自己的问题有一定了解再提问
尽量一句话说完,不要把社区当微信聊天一样用,每一个回复都尽量提供更多的的信息。 -
鱼哥,按你的教程都搞了一遍,非常赞。
但导航目前是在rviz中点击的,啥时候出一个能用代码实现的教程:
1.初次建图跟扫地机器人一样,自己走一圈建图
2.建图后,下次开机的初始定位、导航均用代码实现 -
@154453683 nav2支持通过代码进行这些操作,可以到Nav2官方文档进行学习
-
小鱼哥,我第一步就错了
-
@1740580485 你的网络不行,可以试试 github代理,github.fishros.org,另外终端内容最好赋值粘贴,我好给你修改
一个好的提问不仅能够帮助自己理清楚问题,还有助于别人快速帮助到你。——提问的智慧
问题一定要描述清楚,终端打印一定复制粘贴,方便回答者检索和引用(你可以在linux系统上打开浏览器进社区)
基本的Markdown语法一定要学习下,有的小伙伴图片代码一团糟
提问时一定要提供尽可能多的信息(系统版本,ROS版本,前后操作,终端日志),包括你的目的,比如你其实想装装某个库遇到问题,不要只说这个问题,因为可能有更好的替代方案
先搜索再提问,很多问题其实都有解决方案,确保你自己对自己的问题有一定了解再提问
尽量一句话说完,不要把社区当微信聊天一样用,每一个回复都尽量提供更多的的信息。 -
执行ros2 launch fishbot_bringup fishbot_bringup.launch.py
报错
[INFO] [launch]: All log files can be found below /home/a/.ros/log/2023-10-30-02-11-31-404730-a-10225 [INFO] [launch]: Default logging verbosity is set to INFO Task exception was never retrieved future: <Task finished name='Task-2' coro=<LaunchService._process_one_event() done, defined at /opt/ros/foxy/lib/python3.8/site-packages/launch/launch_service.py:226> exception=PackageNotFoundError("package 'joint_state_publisher' not found, searching: ['/home/a/fishbot/install/fishbot_navigation2', '/home/a/fishbot/install/fishbot_interfaces', '/home/a/fishbot/install/fishbot_description', '/home/a/fishbot/install/fishbot_cartographer', '/home/a/fishbot/install/fishbot_bringup', '/opt/ros/foxy']")> Traceback (most recent call last): File "/opt/ros/foxy/lib/python3.8/site-packages/ament_index_python/packages.py", line 50, in get_package_prefix content, package_prefix = get_resource('packages', package_name) File "/opt/ros/foxy/lib/python3.8/site-packages/ament_index_python/resources.py", line 48, in get_resource raise LookupError( LookupError: Could not find the resource 'joint_state_publisher' of type 'packages' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/ros/foxy/lib/python3.8/site-packages/launch/launch_service.py", line 228, in _process_one_event await self.__process_event(next_event) File "/opt/ros/foxy/lib/python3.8/site-packages/launch/launch_service.py", line 248, in __process_event visit_all_entities_and_collect_futures(entity, self.__context)) File "/opt/ros/foxy/lib/python3.8/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 45, in visit_all_entities_and_collect_futures futures_to_return += visit_all_entities_and_collect_futures(sub_entity, context) File "/opt/ros/foxy/lib/python3.8/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 45, in visit_all_entities_and_collect_futures futures_to_return += visit_all_entities_and_collect_futures(sub_entity, context) File "/opt/ros/foxy/lib/python3.8/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 45, in visit_all_entities_and_collect_futures futures_to_return += visit_all_entities_and_collect_futures(sub_entity, context) [Previous line repeated 1 more time] File "/opt/ros/foxy/lib/python3.8/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 38, in visit_all_entities_and_collect_futures sub_entities = entity.visit(context) File "/opt/ros/foxy/lib/python3.8/site-packages/launch/action.py", line 108, in visit return self.execute(context) File "/opt/ros/foxy/lib/python3.8/site-packages/launch_ros/actions/node.py", line 453, in execute ret = super().execute(context) File "/opt/ros/foxy/lib/python3.8/site-packages/launch/actions/execute_process.py", line 823, in execute self.__expand_substitutions(context) File "/opt/ros/foxy/lib/python3.8/site-packages/launch/actions/execute_process.py", line 668, in __expand_substitutions cmd = [perform_substitutions(context, x) for x in self.__cmd] File "/opt/ros/foxy/lib/python3.8/site-packages/launch/actions/execute_process.py", line 668, in <listcomp> cmd = [perform_substitutions(context, x) for x in self.__cmd] File "/opt/ros/foxy/lib/python3.8/site-packages/launch/utilities/perform_substitutions_impl.py", line 26, in perform_substitutions return ''.join([context.perform_substitution(sub) for sub in subs]) File "/opt/ros/foxy/lib/python3.8/site-packages/launch/utilities/perform_substitutions_impl.py", line 26, in <listcomp> return ''.join([context.perform_substitution(sub) for sub in subs]) File "/opt/ros/foxy/lib/python3.8/site-packages/launch/launch_context.py", line 232, in perform_substitution return substitution.perform(self) File "/opt/ros/foxy/lib/python3.8/site-packages/launch_ros/substitutions/executable_in_package.py", line 76, in perform package_prefix = super().perform(context) File "/opt/ros/foxy/lib/python3.8/site-packages/launch_ros/substitutions/find_package.py", line 79, in perform result = self.find(package) File "/opt/ros/foxy/lib/python3.8/site-packages/launch_ros/substitutions/find_package.py", line 96, in find return get_package_prefix(package_name) File "/opt/ros/foxy/lib/python3.8/site-packages/ament_index_python/packages.py", line 52, in get_package_prefix raise PackageNotFoundError( ament_index_python.packages.PackageNotFoundError: "package 'joint_state_publisher' not found, searching: ['/home/a/fishbot/install/fishbot_navigation2', '/home/a/fishbot/install/fishbot_interfaces', '/home/a/fishbot/install/fishbot_description', '/home/a/fishbot/install/fishbot_cartographer', '/home/a/fishbot/install/fishbot_bringup', '/opt/ros/foxy']"
-
@13768252287 在 [FishBot教程]7. FishBot-Nav2导航测试 中说:
执行ros2 launch fishbot_bringup fishbot_bringup.launch.py
报错
[INFO] [launch]: All log files can be found below /home/a/.ros/log/2023-10-30-02-11-31-404730-a-10225 [INFO] [launch]: Default logging verbosity is set to INFO Task exception was never retrieved future: <Task finished name='Task-2' coro=<LaunchService._process_one_event() done, defined at /opt/ros/foxy/lib/python3.8/site-packages/launch/launch_service.py:226> exception=PackageNotFoundError("package 'joint_state_publisher' not found, searching: ['/home/a/fishbot/install/fishbot_navigation2', '/home/a/fishbot/install/fishbot_interfaces', '/home/a/fishbot/install/fishbot_description', '/home/a/fishbot/install/fishbot_cartographer', '/home/a/fishbot/install/fishbot_bringup', '/opt/ros/foxy']")> Traceback (most recent call last): File "/opt/ros/foxy/lib/python3.8/site-packages/ament_index_python/packages.py", line 50, in get_package_prefix content, package_prefix = get_resource('packages', package_name) File "/opt/ros/foxy/lib/python3.8/site-packages/ament_index_python/resources.py", line 48, in get_resource raise LookupError( LookupError: Could not find the resource 'joint_state_publisher' of type 'packages' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/ros/foxy/lib/python3.8/site-packages/launch/launch_service.py", line 228, in _process_one_event await self.__process_event(next_event) File "/opt/ros/foxy/lib/python3.8/site-packages/launch/launch_service.py", line 248, in __process_event visit_all_entities_and_collect_futures(entity, self.__context)) File "/opt/ros/foxy/lib/python3.8/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 45, in visit_all_entities_and_collect_futures futures_to_return += visit_all_entities_and_collect_futures(sub_entity, context) File "/opt/ros/foxy/lib/python3.8/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 45, in visit_all_entities_and_collect_futures futures_to_return += visit_all_entities_and_collect_futures(sub_entity, context) File "/opt/ros/foxy/lib/python3.8/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 45, in visit_all_entities_and_collect_futures futures_to_return += visit_all_entities_and_collect_futures(sub_entity, context) [Previous line repeated 1 more time] File "/opt/ros/foxy/lib/python3.8/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 38, in visit_all_entities_and_collect_futures sub_entities = entity.visit(context) File "/opt/ros/foxy/lib/python3.8/site-packages/launch/action.py", line 108, in visit return self.execute(context) File "/opt/ros/foxy/lib/python3.8/site-packages/launch_ros/actions/node.py", line 453, in execute ret = super().execute(context) File "/opt/ros/foxy/lib/python3.8/site-packages/launch/actions/execute_process.py", line 823, in execute self.__expand_substitutions(context) File "/opt/ros/foxy/lib/python3.8/site-packages/launch/actions/execute_process.py", line 668, in __expand_substitutions cmd = [perform_substitutions(context, x) for x in self.__cmd] File "/opt/ros/foxy/lib/python3.8/site-packages/launch/actions/execute_process.py", line 668, in <listcomp> cmd = [perform_substitutions(context, x) for x in self.__cmd] File "/opt/ros/foxy/lib/python3.8/site-packages/launch/utilities/perform_substitutions_impl.py", line 26, in perform_substitutions return ''.join([context.perform_substitution(sub) for sub in subs]) File "/opt/ros/foxy/lib/python3.8/site-packages/launch/utilities/perform_substitutions_impl.py", line 26, in <listcomp> return ''.join([context.perform_substitution(sub) for sub in subs]) File "/opt/ros/foxy/lib/python3.8/site-packages/launch/launch_context.py", line 232, in perform_substitution return substitution.perform(self) File "/opt/ros/foxy/lib/python3.8/site-packages/launch_ros/substitutions/executable_in_package.py", line 76, in perform package_prefix = super().perform(context) File "/opt/ros/foxy/lib/python3.8/site-packages/launch_ros/substitutions/find_package.py", line 79, in perform result = self.find(package) File "/opt/ros/foxy/lib/python3.8/site-packages/launch_ros/substitutions/find_package.py", line 96, in find return get_package_prefix(package_name) File "/opt/ros/foxy/lib/python3.8/site-packages/ament_index_python/packages.py", line 52, in get_package_prefix raise PackageNotFoundError( ament_index_python.packages.PackageNotFoundError: "package 'joint_state_publisher' not found, searching: ['/home/a/fishbot/install/fishbot_navigation2', '/home/a/fishbot/install/fishbot_interfaces', '/home/a/fishbot/install/fishbot_description', '/home/a/fishbot/install/fishbot_cartographer', '/home/a/fishbot/install/fishbot_bringup', '/opt/ros/foxy']"
sudo apt install ros-$ROS_DISTRO-joint-state-publisher