Gazebo Plug-in with Simulink : world position/orientation & relative position/orientation of the link

5 views (last 30 days)
Yunsik Jung
Yunsik Jung on 9 Jul 2021
Answered: Gaurav Bhosale on 2 Aug 2021
Hi, all.
I have tried to use the Gazebo Plug-in with Simulink to get the simulation information from Gazebo.
As shown below, I use the Mico in Gazebo and the 6th link is indicated in the following figure. (The red box indicates the position of the 6th link)
When I get the 6th link's position and orientation in Simulink, the word and relative position and orientation are same.
First, the following figure is my bust selector.
And the following figure is my Simulink model.
Does it normal? Or did I make any mistakes in the models?
I think those positions/orientations are the world ones.
(In addition, the orientation of the link is roll, pitch and yaw in Gazebo GUI, but, it is a quaternion in Simlulink)
Thanks!
Yun

Answers (1)

Gaurav Bhosale
Gaurav Bhosale on 2 Aug 2021
Hi Yunsik,
The 'pose' values present in Gazebo GUI are 'relative_pose'
Here, 'relative_pose' from Simulink are matching with Gazebo GUI 'pose'.
If these values are not matching. you can check,
1] You added 'Gazebo Pacer' block or not. As without Pacer, you will not get synchronization.
2] Check your Gazebo model configuration
Further, 'Orientation' are in quaternion so you can convert to euler in MATLAB with quat2eul(quat_val,'ZYX').
Thanks.
With Regards,
Gaurav Bhosale

Community Treasure Hunt

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

Start Hunting!

Translated by