How to solve the error "You tried to access index 0 of the MotorSpeed message array which is of size 0"?

asked 2018-02-13 07:13:20 -0600

Krishneel gravatar image

Hello

I am using simulink to simulate my quadcopter in gazebo. Iam publishing the four motor speeds with the ros topic /iris/command/motor_speed with message type mav_msgs/CommandMotorSpeed.

However when I publish this to gazebo, the motors of my quadcopter model in gazebo stop and I recieve the following error:

F021414 0000::484802:.200000.2188582100530 23823 gazebo_motor_model.cpp:127] Check failed: rot_velocities->motor_speed.size() > motor_number_ You tried to access index 0 of the MotorSpeed message array which is of size 0

Hoping to get some assistance with this since Iam fairly new to gazebo and ros

Thanks in advance

edit retag flag offensive close merge delete