哥你解决了嘛😢 ,我也是这个问题
我要实现简单的rviz模型显示,只有base_link和imu_link
问题描述:为什么我的imu_link显示的是红色的,改了颜色<material name="black">还是显示红色,但是改形状<geometry>
<box size="0.02 0.02 0.02" />
</geometry>
有相对应的反应
图片1(1).png
first_robot.urdf的代码如下
图片1(2).png
d65fae00-dc68-4b7d-ab78-d688bd94d780-image.png
display_robot.launch.py的代码如下
a5bebf2c-3c9e-41c9-a427-33e1a5b5f6dc-image.png
运行时候终端显示如下
f6bbcd19-5fd1-46b2-a10a-df57a4c29fb2-image.png
cmake代码如下
3b341157-df6d-4c40-8afa-3c010d1b939a-image.png
我用的是up主的源码,然后裁剪了一下
两个环境都没有 empy 为什么一个可以编译成功一个不可以
第一个env (base)/ROS_demo/chapt3/chapt3_ws$ colcon build --packages-select example_ros2_interfaces Starting >>> example_ros2_interfaces Finished <<< example_ros2_interfaces [0.77s] Summary: 1 package finished [0.90s] (base) /ROS_demo/chapt3/chapt3_ws$ pip show empy WARNING: Package(s) not found: empy (base) /ROS_demo/chapt3/chapt3_ws$####第二个env
ModuleNotFoundError: No module named 'em' The Python package 'empy' must be installed (hw) /ROS_demo/chapt3/chapt3_ws/src$1.9.5.1章节在驱动雷达节点的时候,点云数据可以正常显示。但是会出现红色字体。如下所示;
(我使用的是串口电脑连接雷达。波特率是115200,之前换过921600 但是没啥反应,结构一样)
0fa8c421-4f5a-4237-aadd-d0f1312e8f4e-image.png
2.在9.55章的时候,出现如下问题:
(我使用的是串口,然后驱动launch 文件)
li@ubantu:~/navigation_project/bot_ws$ ros2 launch bringup bringup.launch.py
[INFO] [launch]: All log files can be found below /home/li/.ros/log/2025-04-29-00-17-18-478907-ubantu-7199
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [joint_state_publisher-1]: process started with pid [7201]
[INFO] [robot_state_publisher-2]: process started with pid [7203]
[INFO] [odom2tf-3]: process started with pid [7205]
[INFO] [micro_ros_agent-4]: process started with pid [7207]
[robot_state_publisher-2] [INFO] [1745857038.701965528] [robot_state_publisher]: got segment base_footprint
[robot_state_publisher-2] [INFO] [1745857038.702253980] [robot_state_publisher]: got segment base_link
[robot_state_publisher-2] [INFO] [1745857038.702289228] [robot_state_publisher]: got segment laser_link
[micro_ros_agent-4] [1745857039.582356] info | TermiosAgentLinux.cpp | init | running... | fd: 3
[micro_ros_agent-4] [1745857039.583524] info | Root.cpp | set_verbose_level | logger setup | verbose_level: 6
[joint_state_publisher-1] [INFO] [1745857039.762095517] [joint_state_publisher]: Waiting for robot_description to be published on the robot_description topic...
[INFO] [ydlidar_node-5]: process started with pid [7252]
[ydlidar_node-5] [INFO] [1745857044.257399143] [ydlidar_node]: [YDLIDAR INFO] Current ROS Driver Version: 1.0.1
[ydlidar_node-5]
[ydlidar_node-5] [2025-04-29 00:17:24][info] SDK initializing
[ydlidar_node-5] [2025-04-29 00:17:24][info] SDK has been initialized
[ydlidar_node-5] [2025-04-29 00:17:24][info] SDK Version: 1.2.9
[ydlidar_node-5] [2025-04-29 00:17:24][info] Connect elapsed time 5 ms
[ydlidar_node-5] [2025-04-29 00:17:24][info] Lidar successfully connected [/dev/ttyUSB0:115200]
[ydlidar_node-5] [2025-04-29 00:17:24][info] Lidar running correctly! The health status good
[ydlidar_node-5] [2025-04-29 00:17:24][info] Current Lidar Model Code 12
[ydlidar_node-5] [2025-04-29 00:17:24][info] Check status, Elapsed time 1 ms
[ydlidar_node-5] [2025-04-29 00:17:24][info] Lidar init success, Elapsed time [7]ms
[ydlidar_node-5] [2025-04-29 00:17:24][info] Start to getting intensity flag
[ydlidar_node-5] [2025-04-29 00:17:25][info] [YDLIDAR] End to getting intensity flag
[ydlidar_node-5] [2025-04-29 00:17:25][info] [YDLIDAR] Create thread 0xC5261640
[ydlidar_node-5] [2025-04-29 00:17:26][info] Successed to start scan mode, Elapsed time 1900 ms
[ydlidar_node-5] [2025-04-29 00:17:26][error] Timeout count: 1
[ydlidar_node-5] [2025-04-29 00:17:27][error] Timeout count: 2
[ydlidar_node-5] [2025-04-29 00:17:28][error] Timeout count: 1
[ydlidar_node-5] [2025-04-29 00:17:29][error] Timeout count: 2
[ydlidar_node-5] [2025-04-29 00:17:30][error] Timeout count: 3
[ydlidar_node-5] [2025-04-29 00:17:33][error] Timeout count: 1
[ydlidar_node-5] [2025-04-29 00:17:34][error] Timeout count: 2
[ydlidar_node-5] [2025-04-29 00:17:35][error] Timeout count: 3
^C[WARNING] [launch]: user interrupted with ctrl-c (SIGINT)
[ydlidar_node-5] [INFO] [1745857056.449131595] [rclcpp]: signal_handler(signum=2)
[robot_state_publisher-2] [INFO] [1745857056.449596325] [rclcpp]: signal_handler(signum=2)
[ERROR] [micro_ros_agent-4]: process has died [pid 7207, exit code -2, cmd '/home/li/navigation_project/bot_ws/install/micro_ros_agent/lib/micro_ros_agent/micro_ros_agent serial -b 115200 --dev /dev/ttyUSB0 -v6 --ros-args'].
[INFO] [robot_state_publisher-2]: process has finished cleanly [pid 7203]
[INFO] [odom2tf-3]: process has finished cleanly [pid 7205]
[INFO] [joint_state_publisher-1]: process has finished cleanly [pid 7201]
[odom2tf-3] [INFO] [1745857056.450243764] [rclcpp]: signal_handler(signum=2)
[ydlidar_node-5] [2025-04-29 00:17:36][error] Failed to turn on the Lidar, because the lidar is [Operation timed out].
[ydlidar_node-5] terminate called after throwing an instance of 'rclcpp::exceptions::RCLError'
[ydlidar_node-5] what(): could not create publisher: rcl node's context is invalid, at ./src/rcl/node.c:428
[ERROR] [ydlidar_node-5]: process has died [pid 7252, exit code -6, cmd '/home/li/navigation_project/bot_ws/install/ydlidar/lib/ydlidar/ydlidar_node --ros-args -r __node:=ydlidar_node -r __ns:=/ --params-file /home/li/navigation_project/bot_ws/install/ydlidar/share/ydlidar/params/ydlidar.yaml'].
[ydlidar_node-5]
9f5c8269-8293-4fba-b977-e0c2fec746a3-image.png
然后是没有scan话题的(如上),我的启动的launch文件如下:
import launch
import launch_ros
from ament_index_python.packages import get_package_share_directory
from launch.launch_description_sources import PythonLaunchDescriptionSource
def generate_launch_description():
bringup_dir = get_package_share_directory(
'bringup')
ydlidar_ros2_dir = get_package_share_directory(
'ydlidar')
我的雷达yaml文件如下:
6c40e7fa-d50f-4cda-b0cb-bedb2f0eb2b7-image.png
然后我后面单独驱动雷达节点如下:
afadd370-2cdd-4f28-b037-6b02010e7081-image.png
我应该怎么修改呢?
版权所有(C) Microsoft Corporation。保留所有权利。
安装最新的 PowerShell,了解新功能和改进!https://aka.ms/PSWindows
PS C:\Users\lenovo> wsl
wxyros@LAPTOP-H729PCGI:/mnt/c/Users/lenovo$ sudo 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
[sudo] password for wxyros:
[1745498564.706010] error | UDPv4AgentLinux.cpp | init | bind error | port: 8888, errno: 98
Error while starting IPvX agent!
[1745498564.706173] info | UDPv4AgentLinux.cpp | fini | server stopped | port: 8888
wxyros@LAPTOP-H729PCGI:/mnt/c/Users/lenovo$ sudo 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
[1745498598.116541] error | UDPv4AgentLinux.cpp | init | bind error | port: 8888, errno: 98
Error while starting IPvX agent!
[1745498598.116644] info | UDPv4AgentLinux.cpp | fini | server stopped | port: 8888
wxyros@LAPTOP-H729PCGI:/mnt/c/Users/lenovo$
根据您的系统,为您推荐安装源为['http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu/', 'http://mirrors.tuna.tsinghua.edu.cn/ros2/ubuntu/']
创建文件:/etc/apt/sources.list.d/ros-fish.list
Run CMD Task:[sudo apt update]
[/][0.60s] 错误:5 http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu bionic InReleas[|][0.63s] 获取:6 http://mirrors.tuna.tsinghua.edu.cn/ros2/ubuntu bionic InRelea[-][0.68s] 获取:6 http://mirrors.tuna.tsinghua.edu.cn/ros2/ubuntu bionic InRelea[-][0.70s] 获取:6 http://mirrors.tuna.tsinghua.edu.cn/ros2/ubuntu bionic InRelea[-][0.80s] 获取:6 http://mirrors.tuna.tsinghua.edu.cn/ros2/ubuntu bionic InRelea[-][0.90s] 获取:6 http://mirrors.tuna.tsinghua.edu.cn/ros2/ubuntu bionic InRelea[-][1.00s] 获取:6 http://mirrors.tuna.tsinghua.edu.cn/ros2/ubuntu bionic InRelea[-][1.10s] 获取:6 http://mirrors.tuna.tsinghua.edu.cn/ros2/ubuntu bionic InRelea[-][1.20s] 获取:6 http://mirrors.tuna.tsinghua.edu.cn/ros2/ubuntu bionic InRelea[-][1.30s] 获取:7 http://mirrors.tuna.tsinghua.edu.cn/ros2/ubuntu bionic/main am[/][1.35s] 获取:7 http://mirrors.tuna.tsinghua.edu.cn/ros2/ubuntu bionic/main am[/][1.40s] 获取:7 http://mirrors.tuna.tsinghua.edu.cn/ros2/ubuntu bionic/main am[/][1.50s] 获取:7 http://mirrors.tuna.tsinghua.edu.cn/ros2/ubuntu bionic/main am[/][1.60s] 获取:7 http://mirrors.tuna.tsinghua.edu.cn/ros2/ubuntu bionic/main am[/][1.70s] 获取:7 http://mirrors.tuna.tsinghua.edu.cn/ros2/ubuntu bionic/main am[/][1.80s] 获取:7 http://mirrors.tuna.tsinghua.edu.cn/ros2/ubuntu bionic/main am[/][1.90s] 获取:7 http://mirrors.tuna.tsinghua.edu.cn/ros2/ubuntu bionic/main am[/][2.00s] 获取:7 http://mirrors.tuna.tsinghua.edu.cn/ros2/ubuntu bionic/main am[/][2.10s] 获取:7 http://mirrors.tuna.tsinghua.edu.cn/ros2/ubuntu bionic/main am[/][2.20s] 获取:7 http://mirrors.tuna.tsinghua.edu.cn/ros2/ubuntu bionic/main am[/][2.30s] 获取:7 http://mirrors.tuna.tsinghua.edu.cn/ros2/ubuntu bionic/main am[/][2.40s] 获取:7 http://mirrors.tuna.tsinghua.edu.cn/ros2/ubuntu bionic/main am[/][2.50s] 获取:7 http://mirrors.tuna.tsinghua.edu.cn/ros2/ubuntu bionic/main am[/][2.60s] 获取:7 http://mirrors.tuna.tsinghua.edu.cn/ros2/ubuntu bionic/main am[/][2.70s] 获取:7 http://mirrors.tuna.tsinghua.edu.cn/ros2/ubuntu bionic/main am[/][2.81s] 获取:7 http://mirrors.tuna.tsinghua.edu.cn/ros2/ubuntu bionic/main am[/][2.91s] 获取:7 http://mirrors.tuna.tsinghua.edu.cn/ros2/ubuntu bionic/main am[/][3.01s] 获取:7 http://mirrors.tuna.tsinghua.edu.cn/ros2/ubuntu bionic/main am[-][3.21s] CMD Result:code:100
apt更新失败,后续程序可能会继续尝试...,[]
Run CMD Task:[sudo apt search ros-base ]
[][0.49s] A package which extends 'ros_core' and includes other basic functio[-][0.49s] A package which extends 'ros_core' and includes other basic functio[][0.49s] A package which extends 'ros_core' and includes other basic functio[-][0.49s] A package which extends 'ros_core' and includes other basic functio[/][0.49s] ros-melodic-ros-base/now 1.4.1-0bionic.20230215.205719 amd64 [已安装[][0.49s] A metapackage which extends ros_core and includes other basic non-r[-][0.49s] CMD Result:success
后续在下载rosdepc时无法下载多次换源依旧无效
[sudo] yux 的密码:
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
E: 无法定位软件包 ros-melodic-jsk-rviz-plugins
python功能包节点运行ros2 run demo_python_dpkg python_node时找不到名为“demo_python_pkg.python_node”的module
dw@dw:~/codes/chapt2$ ros2 run demo_python_pkg python_node
Traceback (most recent call last):
File "/home/dw/codes/chapt2/install/demo_python_pkg/lib/demo_python_pkg/python_node", line 33, in <module>
sys.exit(load_entry_point('demo-python-pkg==0.0.0', 'console_scripts', 'python_node')())
File "/home/dw/codes/chapt2/install/demo_python_pkg/lib/demo_python_pkg/python_node", line 25, in importlib_load_entry_point
return next(matches).load()
File "/usr/lib/python3.10/importlib/metadata/init.py", line 171, in load
module = import_module(match.group('module'))
File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'demo_python_pkg.python_node'
[ros2run]: Process exited with failure 1
这种情况该如何解决
屏幕截图 2025-04-22 201806.png朋友下载了个这个pip3 install face_recognition -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple 成功了但是我还是有错误
gazebo中无法加载模型如何解决
报错显示:ValueError: Unicode strings with encoding declaration are not supported. Please use bytes input or XML fragments without declaration.
可能是spawn_entity节点的问题。请问如何解决,谢谢!
代码如下
spawn_entity_node = launch_ros.actions.Node(
package='gazebo_ros',
executable='spawn_entity.py',
arguments=['-topic', '/robot_description','-entity', robot_name_in_model ],
output="screen",
)
fbea55a6-4ba9-4853-a501-dce4f5d02ae3-image.png tf是这个样子,但是没有找到map到odom的,然后我使用topic,发现是存在/map的,如下所示,7324ec0e-5d5f-47ac-941b-a2025e51c666-image.png 然后我使用ros2 topic echo /map
然后卡在这里就不动了,鱼哥,这个应该怎么解决呢?
fishbot板子可以烧录程序,烧录程序后用Agent和ROS2连接时一直显示无法找到串口,这个要怎么解决啊?!
6053ab2c-0828-4f2f-9a0a-fd785c6fa785-image.png
仿真是用的官方的ur5-1.2.7版本的模型包,我在加入robotiq_85夹爪后,启动rviz,在motoinplanning插件中拖动轨迹球,轨迹可以规划,但执行失败,提示图片中的的警告。我看本社区这个人的帖子他的解决办法是控制调调参,但我总也调不好,【https://fishros.org.cn/forum/topic/528/机械臂rviz-gazebo联合仿真报错】 所以我不知道是不是真的是因为参数导致轨迹无法执行的问题。或者有没有人调过参数,分享一下。这个问题我已经卡在这里很久了
回复: [FishBot教程] 9.0.3. 主控板固件烧录与配置 我对esp32并不熟悉,但是我按照教程用串口助手给esp32刷入了固件,我也不太清楚这些固件是什么,那么此时我是否必须还要去修改esp32的代码,使其能使用microROS。我照着快速上手的视频操作过,功能都是正常的。那么接下来,我只需要在电脑上编写ROS2的代码就行了吗@小鱼
3744c805-3601-48d9-9217-8e01e5db6589-图片.png
如图,kuka的机械臂,可以在gazebo中正常打开,但移动下方的方块砸机械臂,它一点而都不动,也尝试过直接给机械臂施加力和力矩,机械臂也不动,下面粘贴urdf部分urdf文件,
还有部分xacro文件内容
```
<gazebo reference="link_1">
<material>Gazebo/Orange</material>
<self_collide>false</self_collide>
<gravity>true</gravity>
</gazebo>
<gazebo>
<is_static>false</is_static>
<self_collide>true</self_collide>
</gazebo>
<ros2_control name="GazeboSystem" type="system">
<hardware>
<plugin>gazebo_ros2_control/GazeboSystem</plugin>
</hardware>
<joint name="joint_1">
<command_interface name="position"/>
<command_interface name="effort"/>
<!-- <command_interface name="velocity"/> -->
<state_interface name="position">
<param name="initial_value">0</param>
</state_interface>
<state_interface name="velocity"/>
<state_interface name="effort"/>
</joint>
请问我在gazebo.launch文件中修改了一个机器人模型,但是命名空间是不起作用还是咋了
一直停留在[robot3.spawn_entity]:Waiting for entity xml on robot1/robot_description不显示机器人模型
具体launch修改代码如下:
import launch
import launch_ros
from ament_index_python.packages import get_package_share_directory
import os
import launch_ros.parameter_descriptions
import launch.launch_description_sources
def generate_launch_description():
# 获取功能包的share路径
urdf_package_path = get_package_share_directory('fishbot_description')
default_xacro_path = os.path.join(urdf_package_path, 'urdf', 'fishbot', 'fishbot.urdf.xacro')
default_gazebo_world_path = os.path.join(urdf_package_path, 'world', 'custom_room.world')
rk3588s的板子,系统是ubuntu22.04
使用一键安装ros2 humble 桌面版后,重启系统就会到这个登陆界面fad84da0fbb5efd99d8da6afed90d61f.jpg
但是输入密码后会黑屏然后又跳回这个界面。
这是什么情况呀
2.2节用cmake编译c++时,提示python解释器没找到,我已经卸载anaconda3了,请问这个怎么解决?716b4577-a625-4f5e-a666-6333ffe7268e.png
我C++创建节点是可以正常启动节点的
python启动节点后,正常应该是 等待状态,目前我的是直接没反映,查看节点信息也没有
可能是哪个python库没安装吗,求大佬指教
(教程示例)源代码:
import rclpy
from rclpy.node import Node
def main():
rclpy.init()
node = Node("python_node")
rclpy.spin(node)
rclpy.shutdowm()
终端启动命令:
wl@wl-VirtualBox:~/chapt1$ python3 ros2_python_node.py
wl@wl-VirtualBox:~/chapt1$ (这里直接跳出,未启动节点)
08ae98961b08e58e1f63051e5ac444b.jpg这个是怎么回事。。。
294fdc2a-5311-4364-81ab-db620fe88f2d-1745367853576.png
1、执行gazebo_sim.launch.py的时候上图问题
(1)libgazebo_ros2_control.so找不到
(2)load_controller无法连接到
dd7905a1-1581-4f89-9a2b-9e7d18efab56-image.png
2、安装完gazebo后按照教材执行查看命令的时候看不到教材示例
请问这种问题怎么解决
(补充:用gitee上的代码也是这个效果!)
ros@ros2:~/fishbot_ws$ ros2 run yolov5_ros2 yolo_detect_2d --ros-args -p device:=cpu -p image_topic:=/fishbot_camera_raw
[INFO] [1745386092.623652118] [yolov5_ros2]: Current ROS 2 distribution: humble
[INFO] [1745386092.859007222] [yolov5_ros2]: default_camera_info: [476.7030836014194, 0.0, 400.5, 0.0, 476.7030836014194, 400.5, 0.0, 0.0, 1.0]
[0.0, 0.0, 0.0, 0.0, 0.0]
ros2 topic echo /yolo_result
订阅结果为空
版块
-
1.3k
主题4.7k
帖子 -
415
主题2.8k
帖子 -
33
主题154
帖子 -
1.0k
主题4.1k
帖子 -
965
主题3.5k
帖子 -
4
主题10
帖子 -
349
主题1.6k
帖子