Hi, I need to test a new controller design on my boat. The algorithm will be running on a raspberry with ROS and mavros. I wan to use the navigation system of the ardurover and make direct thruster commands.
Is there a topic that allows me to write direct commands to the thrusters? What controllers are working in GUIDED mode? Do I need to use MANUAL mode and override RC out channels with mavros?
The problem here is that I need to test the whole low level control, so I need AP do not send command to the motors. In manual mode, if anybody touch the RC, is there a way to send command to the motors using mavlink/mavros?
Rover has a “set_steering_and_throttle()” method in Guided mode that accepts a raw steering and throttle input (both in the range -1 to +1) but at the moment it is only accessible via scripting so we are missing some plumbing to allow it to work with mavlink and mavros.
I’m very happy to add support in Rover to improve external control if we can figure out what mavlink messages to use.
I’m not sure how we could get that really low level output all the way through to the motors. Maybe a lua script could be used to write a special AP motor driver (like we’ve done for walking robots) and then it could also intercept mavlink messages.
It’s ugly though, by sending pwm you’re really re-doing a lot of the good stuff that AP already takes care of. I think it would be better to modify the model to provide a higher level output.
The thing is we try to make a controller that takes into account the dynamic model of the ASV. We already make some parameters identification and working on the low level controller.
For reference here and here are some work on the subject.
I think I will need to command the motors outside the AP for now.
Thank @rmackay9 for your help.