天天看點

matlab urdf,Melodic 使用URDF建立簡單的機器人模型

本人Linux版本:Ubuntu 18.04LTS

ROS版本:Melodic

URDF代碼

launch檔案

會有以下報錯

[WARN] [1582867522.390661]: The 'use_gui' parameter was specified, which is deprecated. We'll attempt to find and run the GUI, but if this fails you should install the'joint_state_publisher_gui'package instead and run that. This backwards compatibility option will be removed in Noetic.

[ERROR] [1582867522.392212]: Could not find the GUI, install the 'joint_state_publisher_gui'package

[joint_state_publisher-2] process has died [pid 9056, exit code 1, cmd /opt/ros/melodic/lib/joint_state_publisher/joint_state_publisher __name:=joint_state_publisher __log:=/home/vtas/.ros/log/b6cbe59e-59ea-11ea-b2f1-84ef181f5770/joint_state_publisher-2.log].

logfile: /home/vtas/.ros/log/b6cbe59e-59ea-11ea-b2f1-84ef181f5770/joint_state_publisher-2*.log

主要解決辦法如下:

1、joint_state_publisher_gui是剛更新出來的包,需要把之前的joint_state_publisher換成joint_state_publisher_gui

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

如果是kinetic版本的

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

2、URDF檔案中不能有中文注釋,删除掉中文注釋;

然後再運作就可以成功打開了。

但是還是存在一個warning

[WARN] [1582868994.395547]: The 'use_gui' parameter was specified, which is deprecated. We'll attempt to find and run the GUI, but if this fails you should install the'joint_state_publisher_gui'package instead and run that. This backwards compatibility option will be removed in Noetic.

希望看到的人提供一個解決思路,不勝感激。

二更

編譯後不用再重複添加環境變量source的辦法

例如catkin_ws

在/home 檔案夾下按ctrl+h顯示隐藏檔案

打開 .bashrc

再最後輸入  source+路徑

source /home/vtas/catkin_ws/devel/setup.bash

之後就沒必要每次都source一下了