ROS问题—Rviz显示URDF模型时报错:No transform from [anything] to [base_link]

操作系统:Ubuntu 16.04
ROS版本:kinetic

问题

在使用Rviz显示URDF模型时,Rviz可以正常打开,但出现如下报错:

No transform from [anything] to [base_link]

命令行终端报错如下:
ROS问题—Rviz显示URDF模型时报错:No transform from [anything] to [base_link]_第1张图片

[ERROR] [1586164821.790872]: Could not find the GUI, install the 'joint_state_publisher_gui' package
[joint_state_publisher-2] process has died [pid 11942, exit code 1, cmd /opt/ros/kinetic/lib/joint_state_publisher/joint_state_publisher __name:=joint_state_publisher __log:=/home/cai/.ros/log/d663b920-77e7-11ea-a137-2c6e8599f6bf/joint_state_publisher-2.log].
log file: /home/cai/.ros/log/d663b920-77e7-11ea-a137-2c6e8599f6bf/joint_state_publisher-2*.log

原因

未安装 joint_state_publisher_gui 功能包

解决

输入如下命令,安装 joint_state_publisher_gui 功能包

sudo apt-get install ros-kinetic-joint-state-publisher-gui

安装完之后重新运行launch文件,会多出一个 joint_state_publisher 插件,如图所示:
ROS问题—Rviz显示URDF模型时报错:No transform from [anything] to [base_link]_第2张图片完美解决!

参考:
1、Melodic 使用URDF创建简单的机器人模型

你可能感兴趣的:(ROS问题—Rviz显示URDF模型时报错:No transform from [anything] to [base_link])