Multiple mobile robots simulation with simulink and gazebo

Hi, I'm trying to perform co-simulation between Simulink and Gazebo, driving more then one robot. I use the Gazebo apply command block in order to drive the robots. It works when I drive only one robot, but if I try to drive more then one robots, only one robot moves. Can someone help me?

 Accepted Answer

Hi Alberto,
The ApplyLinkWrench command with two robot can be configured as follows and work for two robots.
Can you specify which ApplyCommand are you trying?
Thanks.
With Regards,
Gaurav Bhosale

4 Comments

Hi Gaurav, I'm using ApplyJointTorque. I'm trying to control five different unicycles, so I'm using one ApplyCommand for every wheel, selecting for example robotA/left_wheel_hinge for every wheel and for every robot. The problem is that only one robot moves and the others don't receive any command. Do you know what may be the problem?
Thanks
Hi Alberto,
There is overriding issue associated with same joint name for ApplyJointTorque. e.g. If you have two robots of different name robotA , robotB but having same joint name robotA/left_wheel_hinge and robotB/left_wheel_hinge, then the torque values of robotA are overriden by robotB torque values. We are working on that issue. Meanwhile, I suggest you to change the joint name such as 'robotA/left_wheel_hingeA' and 'robotB/left_wheel_hingeB', so that the command will not be overridden. Please try this and let me know, it solves your issue or not.
Thanks
Thank you very much. I will try and I will let you know.

Sign in to comment.

More Answers (0)

Products

Release

R2020b

Community Treasure Hunt

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

Start Hunting!