小鱼 ROS 2 新书上线!点击链接查看, 新书配套视频点击链接查看。
提问前必看的发帖注意事项—— 提问前必看!不符合要求的问题拒绝回答!!
社区使用指南—如何添加标签修改密码
机器人建模中rviz2不显示轮子问题?
-
```
第八章机器人建模
入门篇的创建一个两轮差速模型,joint的类型改为固定关节才可以正常显示,其他类型就无法显示了
-
@2307205467 在 机器人建模中rviz2不显示轮子问题? 中说:
joint的类型改为固定关节才可以正常显示
joint_states_publisher 节点有问题
@小鱼 在 提问前必看!一定要看!必须看一下! 中说:
问题一定要描述清楚,终端打印一定复制粘贴,方便回答者检索和引用(你可以在linux系统上打开浏览器进社区)
基本的Markdown语法一定要学习下,有的小伙伴图片代码一团糟
提问时一定要提供尽可能多的信息(系统版本,ROS版本,前后操作,终端日志),包括你的目的,比如你其实想装装某个库遇到问题,不要只说这个问题,因为可能有更好的替代方案
先搜索再提问,很多问题其实都有解决方案,确保你自己对自己的问题有一定了解再提问
尽量一句话说完,不要把社区当微信聊天一样用,每一个回复都尽量提供更多的的信息。 -
@小鱼 想让这个车子正常显示车轮,又可以通过gui界面控制车轮。看到你说的 joint_states_publisher 有问题,'joint_state_publisher_gui'我改成了'joint_state_publisher'轮子正常显示,rviz2不再报错,但是rviz2界面没有显示joint publishe的GUI界面,
主要报错信息:[rviz2-3] QSocketNotifier: Can only be used with threads started with QThread [rviz2-3] /opt/ros/humble/lib/rviz2/rviz2: symbol lookup error: /snap/core20/current/lib/x86_64-linux-gnu/libpthread.so.0: undefined symbol: __libc_pthread_init, version GLIBC_PRIVATE [ERROR] [rviz2-3]: process has died [pid 9684, exit code 127, cmd '/opt/ros/humble/lib/rviz2/rviz2 --ros-args -r __node:=rviz2'].
这个是完整的控制台信息:
(base) ros2@ros2-virtual-machine:~/chapt8_ws/src$ ros2 launch fishbot_description display_rviz2.launch.py [INFO] [launch]: All log files can be found below /home/ros2/.ros/log/2023-06-12-16-07-11-102421-ros2-virtual-machine-9678 [INFO] [launch]: Default logging verbosity is set to INFO [INFO] [robot_state_publisher-1]: process started with pid [9680] [INFO] [joint_state_publisher-2]: process started with pid [9682] [INFO] [rviz2-3]: process started with pid [9684] [robot_state_publisher-1] [WARN] [1686557231.263046961] [robot_state_publisher]: No robot_description parameter, but command-line argument available. Assuming argument is name of URDF file. This backwards compatibility fallback will be removed in the future. [robot_state_publisher-1] [INFO] [1686557231.283604297] [robot_state_publisher]: got segment base_link [robot_state_publisher-1] [INFO] [1686557231.284050774] [robot_state_publisher]: got segment caster_link [robot_state_publisher-1] [INFO] [1686557231.284213298] [robot_state_publisher]: got segment imu_link [robot_state_publisher-1] [INFO] [1686557231.284369150] [robot_state_publisher]: got segment laser_link [robot_state_publisher-1] [INFO] [1686557231.284499531] [robot_state_publisher]: got segment left_wheel_link [robot_state_publisher-1] [INFO] [1686557231.284656998] [robot_state_publisher]: got segment right_wheel_link [rviz2-3] QSocketNotifier: Can only be used with threads started with QThread [rviz2-3] /opt/ros/humble/lib/rviz2/rviz2: symbol lookup error: /snap/core20/current/lib/x86_64-linux-gnu/libpthread.so.0: undefined symbol: __libc_pthread_init, version GLIBC_PRIVATE [ERROR] [rviz2-3]: process has died [pid 9684, exit code 127, cmd '/opt/ros/humble/lib/rviz2/rviz2 --ros-args -r __node:=rviz2'].
如下图所示:
-
-
@小鱼 小鱼老师您好,所以这个节点是有什么问题吗,我看ros2 topic list里面joint state是正常发布的,但是在rviz里面的轮子就是无法关联上(题主一开始相同的问题),我的topic list如下:
/clicked_point
/goal_pose
/initialpose
/joint_states
/parameter_events
/robot_description
/rosout
/tf
/tf_static
同时我按题主说的去除gui也没有正常关联和显示轮子