Thanks rmackay9 for this quick answer and hint.
I’ve tried this before though. -c is for custom modes, which are not supported by mu FCU - I’ve got mode:Unsupported FCU in reply.
So I can choose only between basic modes (-b).
I feel like it is more ardupilot issue rather than ROS - the command is being sent properly, but FCU doesn;t accept it in its particular state for some reason.
I had similiar problem before with DO_SET_SERVO and the solution was to … switch joystick on in GCU…
BUt it still doesn’t help for changing mode.
I’m pretty sure that it must be “-c”. Perhaps try connecting a ground station to the flight controller to test changing modes and see if it displays a message. Alternatively the dataflash logs will contain a message saying why requests to change flight mode failed.
I know that this topic is quiet for more than one year now, but I’m facing a similar problem and I was wondering if you were able to solve your problem.
We did finally, after long battle. An upgrade of ardurover to the newest version this year and usage of custom modes "rosrun mavros mavsys mode -c 4” was the solution.
Hi @v-to,
Thank you for getting back to me! To be completely honest with you. I was always able to change the mode, but I keep getting an error:
CMD: Unexpected command 11, result 0
Although the mode does change as I get feedback from the pixhawk and I can also see it in Mission Planner. Do you also get the same error?
Another thing you’ve mentioned was that you had been able to work with a SERVO using DO_SET_SERVO. I guess you’re referring to MAV_CMD_DO_SET_SERVO, (command 183). Is that right?
I’ve tried to use it by issuing
rosrun mavros mavcmd int 183 1 1023 0 0 0 0 0
But I’m getting the error
CMD: Unexpected command 183, result 3
I’ve also tried to publish it to OverrideRCIn with no luck.
Yes. I was using command 183, but it was working also with some servos, like searchlight or additional appliances. However I was not able to change mode with this command.
I got, what you have Unexpected command 183, result 3.
In fact we didn’t find the error source. We swithed to other things for a couple of months and when we came back we updated ardurover and it started to work.
So I am back with this stuff now and I am back with this problem again…
It appeared that othert guys had some solution but it was not fully functinal and they didn;t know in fact how it worked…
Now I am back fro other project and I am trying to find a solution for this again.
So, can you please tell me if you had any luck with this?