当前位置:网站首页>Exploration of webots and ROS joint simulation (I): software installation

Exploration of webots and ROS joint simulation (I): software installation

2022-06-26 08:38:00 Yu Getou

Environmental Science :ubuntu18.04

Installed version :webots2020b

Statement : Because my use is webots And ROS Co simulation , While writing this blog ,webots The latest version webots2021b Not yet ROS( Personal test , Or maybe I opened it in the wrong way ?), So I chose this stable version . If later versions support ROS 了 , Will also consider updating to the latest version .

The installation process

1. Download from the official website

webots Official website
 Insert picture description here

(1) choice webots_2021b-rev1_amd64.deb Download .

(2) After downloading , Go to the specified folder and install with the following instructions

sudo dpkg -i webots_2020b-rev1_amd64.deb

(2) install webots_ros

sudo apt install ros-melodic-webots-ros

(4) Add a path

vim ~/.bashrc
# Add... In the last line 
export WEBOTS_HOME=/usr/local/webots

Possible problems in installation

  1. The dependency library reports an error
    Reference resources Repair Webots stay ubuntu There are some dependency problems in the installation of
  2. libssh-dev Not configured
    Reference resources Solve the problem of dependent library version

An error is reported during operation

  1. Cannot mix incompatible Qt library (version1) with this library (version2)
    Solution : The cause of this problem is that there are multiple Qt route , Just comment it out bashrc Medium Qt Just query the path
vim ~/.bashrc
# Comment out QT_PLUGIN_PATH and LD_LIBRARY_PATH
#export QT_PLUGIN_PATH=/home/jozenlee/Qt/Tools/QtCreator/lib/Qt/plugins
#export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib64"

(5) Moving files

  1. take /usr/local/webots/projects/languages The next path webots_ros Copied to the catkin_make/src Under the path .
  2. take /usr/local/webots/projects/default/controllers/ros/include/ Under the folder srv and msg Copy the folder to the folder just placed in catkin_ws Working space webots_ros In the function package .
     Insert picture description here

(6) function demo

# To compile the first 
cd ~/catkin_ws/
catkin_make

# Run routines 
roslaunch webots_ros pioneer3at.launch

When this screen appears, it means success , The robot is moving , The upper left corner is the camera image on the robot .
 Insert picture description here

原网站

版权声明
本文为[Yu Getou]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202170556033277.html