I read the ardupilot parameter that set servon_function to disabled will set up control through mavlink command, when I did it and click the action in qGroundcontrol, nothing happen the motor didn’t rotate. But I can see that the mavlink do send the command to change the servo PWM in my mavlink analyze tool. So I believe some modes for my boat is wrong. Can someone helps me? Thanks
Hi @jialuy2 -
Have you confirmed your servo has 5V power connected to the AUX rail? As @EliotBR mentioned in the thread you’re referring to, this is required - you could be sending the signal but not powering the servo?
Thanks for your fast reply. I’m not electrical guy but I didn’t change the starboard once I receive the blueboat. and I can control the motor through BLUEos and qgroundcontrol motor test so I think I have connected.
Hi @jialuy2 -
Let me back up, apologies. You’re not trying to control an additional servo it would seem. What are you trying to do? If you’d just like to test the motors, the BlueOS or QGC motor test interface is definitely the best way to accomplish this.
Servo channel 1 and 3 are configured to output to the motors that propel the BlueBoat. The ServoFunction for 1 and 3 are set for differential (skid) steering. Typically custom actions are used to control additional servo motors or ESCs connected to other channels…
Right now I tried to use my own mavlink message to control the blueboat motor and I have added my json file that I mentioned before. I tried to set the servofunction to disabled, throttle, and gpio mode, but I can’t control it when I click the action button. So I am wondering somewhere I did wrong
I’m still not understanding your goals @jialuy2 -
Are you trying to control the BlueBoat via mavlink message to make the vehicle navigate? Or are you just trying to spin the motor as a test? What application has you chasing motor control via button in QGC?
I’d suspect that what you’re trying to do isn’t supported, at least without disabling the vehicles ability to navigate…
Sorry I didn’t explain it clearly. My final goal is to using moos-ivp to generate the speed and heading information and transfer them to blueboat to automatically control the boat . For my first step test I would like to generate some user defined mavlink message from moos to check whether the motor will rotate as desired, like transfering a message that let the boat to speed up. Right now I have my json file which contain the speed up and down function, when I want to test them through qgroundcontrol and added them as user defined action, when I click the action button the motor didn’t rotate. I am wondering if I set the mode wrong for the ardupilot parameter. Thanks for your time!
Hi @jialuy2 -
If your goal is to control the boat by sending desired speed and heading, than the approach you’re taking is not the correct one - the thread you linked is focused on triggering external devices on additional channels, not controlling the vehicle itself!
To control the vehicle in the way you’d like to, you’ll need to use pymavlink! This thread has relevant information, albeit for ArduSub and not ArduRover.
Thanks @tony-white
I will take a look! By the way, do we have mavlink message that can set the speed and heading of boat instead of controlling the PWM of the servo. I plan to use c++ to send message since the moos is built by c++.
Hi, Tony.
I tried the rover command SET_ATTITUDE_TARGET and tried to send the command to the boat but my boat didn’t response for my signal. Could you check my recent post? Thanks for your time