Control Manipulator Robot with Co-Simulation in Simulink and Gazebo: Error parsing XML in file [/home/ubu​ntu1804/wo​rlds/Ur10B​asicWithPl​ugin.world​]

6 views (last 30 days)
Hi,
I'm trying to follow the next tutorial to perform a co-simulation between Simulink and Gazebo in a Ubuntu machine. I'm using Ubuntu 18.04 running ROS Melodic and Gazebo 9.19.
I think I've followed all the steps of the nested tutorials, but I'm obtaining the following error in the Ubuntu terminal:
Gazebo multi-robot simulator, version 9.19.0
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org
[Msg] Waiting for master.
Gazebo multi-robot simulator, version 9.19.0
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org
[Msg] Waiting for master.
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 172.24.1.140
Error [parser.cc:340] Error parsing XML in file [/home/ubuntu1804/worlds/Ur10BasicWithPlugin.world]: Error: empty tag.
[Err] [Server.cc:426] Unable to read sdf file[/home/ubuntu1804/worlds/Ur10BasicWithPlugin.world]
[Wrn] [Server.cc:362] Falling back on worlds/empty.world
[Msg] Loading world file [/usr/share/gazebo-9/worlds/empty.world]
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 172.24.1.140
[Err] [InsertModelWidget.cc:426] Missing model.config for model "/home/ubuntu1804/.gazebo/models/.git"
Recap of the followed steps:
0) First, clone the GitHub repo of Universal Robots used in the Robotic System Toolbox of MATLAB. As suggested, I'm also ignoring the ur_kinematics package.
mkdir ~/catkin_ws
cd ~/catkin_ws
mkdir src
cd src
touch universal_robot/ur_kinematics/CATKIN_IGNORE
I'm also compiling this workspace with catkin_make, even if I believe it's not mandatory for thist test.
1) Then, Install Gazebo Plugin Manually from Setup Gazebo Simulation Environment:
packageGazeboPlugin
mkdir src
cd src
unzip /home/ubuntu1804/GazeboPlugin
cd GazeboPlugin
rm -r build
mkdir build
cd build
cmake ..
make
if exist('GazeboPlugin', 'dir')
rmdir('GazeboPlugin', 's');
end
if exist('GazeboPlugin.zip', 'file')
delete('GazeboPlugin.zip');
end
The previous steps have been successful since I'm able to launch the multiSensorPluginTest.world but not the Ur10BasicWithPlugin.world.
2) I've copied Ur10BasicWithPlugin.world from the provided Virtual Machine for the sake of simplicity. The unique change I've done is replacing all the paths where appears /home/user/ to my own /home/ubuntu1804/ for the robot meshes. However, this should only make a difference in the visual, i.e., no errors are expected.
Note that the same structure of the tutorial have been followed.
/home/ubuntu1804/
---- catkin_ws/universal_robot
---- src
---- build
---- devel
---- worlds/Ur10BasicWithPlugin.world
---- src/GazeboPlugin
---- export
---- lib
---- libGazeboCoSimPlugin.so
---- (etc.)
---- include
---- (etc.)
This are the commands I'm trying in the Ubuntu terminal:
cd /home/ubuntu1804/src/GazeboPlugin/export
export SVGA_VGPU10=0
gazebo /home/ubuntu1804/worlds/Ur10BasicWithPlugin.world --verbose
At this point, the terminal prompts the error from the beginning related to the .world file.
Any help is welcome.
Jon

Accepted Answer

Jon Aztiria
Jon Aztiria on 19 May 2022
I've just made the test with the UR repo of the Melodic branch and it works (no need to include a CATKIN_IGNORE file in ur_kinematics).
Now I'm able to run the simulation properly and control de Gazebo robot from Simulink.

More Answers (0)

Products


Release

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!