ArduRover: Using more servos in both Auto and Manual mode

Hi.
I am building an ardupilot apm2.6 controlled RC boat and I would like to use two additional servos for releasing things in both Auto and Manual mode with a 6 channel transmitter. If I set to “0” the RC channel function I can use the 2 servos in Auto mode but not in Manual and if I set RC Function to Pass Through I can use it only in manual mode but not in Auto mode. How could I solve this problem to can I use servos with both the transmitter and in Auto mode? Please help me.
Thanks.

First thanks for re-posting in the correct place.
Now I tested with RC5_FUNCTION set to 1 which RCPassThru. Then with my rover in Manual I moved dial and the servo moved and then in Auto did the same thing and it still worked.
Can you attach a tlog or dataflash log and I’ll have a look. Some more details on your transmitter setup would be good too i.e. which transmitter, which channel on your transmitter are you using and how have you configured it.

Thanks, Grant.

Thanks for your fast reply. AT first I have to modify my firmware version. I am using the newest 3.0.1 ArduRover version, sorry (In android Tower program firmware version was not correct).
Now I am not at home so I am writing based on my mind. I am using my left stick on my Esky transmitter for throttle and turning. These are channel 3 and 4. I have set thwm accordingly in the mission planner. I would like to use my right stick which are ch 1 and ch 2 for using the servos. Due to the reason that ch1-ch4 there are no rc function changing possibility in the mission planner I ha connected ch1 and ch2 to the apm input 7 and 8 and the servos to output 7 and 8. If I set rc7 and 8 function to 0 the servos are working in auto mode but not in manual. If I set them to Passthru they are only working in manual mode. Thanks for your help in advance.

One more thing to this topic to be clear my problem. When I told that servo is only working in Manual mode and not in Auto I wanted to say that in this case when I apply a Set servo command after one of the waypoint e.g. in Tower program then it is not setting the servo automatically. It is only working with the transmitter sticks or switches but not doing ardupilot automatically. I hope now my problem is maybe clear.
Thanks for the support in advance.

Any ideas regarding my problem. Thanks in advance. Krisztian

In your transmitter you should of been able to remap the right sticks to output on different channels. The way you have done it will work on an APM but not a Pixhawk as there aren’t discrete input signals and it uses PPMSUM instead.
As I said it works for me. Can you please post a tlog and/or dataflash file and I’ll have a look. Its the only way I will be able to resolve the problem.
Thanks, Grant.

Sorry for the late reply but I was on holiday.
Unfortunately my transmitter is an old one without the possibility to remap the sticks on it. This is why I tried to override the problem in this way. The Ardupilot I am using is an APM2.6 not a Pixhawk. As I have already mentioned if I set the Function of the channel to 0 (disabled) it is working correctly in Auto mode (automatically operating the servos with the Do set servo command in the Tower program) but if I switch back to Manual Mode it is not working with the sticks. If I set the Function to 1 (Pass through) then it is working correctly with the sticks, but not working in Auto mode (servos are not operating with the DO set servo command).
Unfortunately I do not now how to make a tlog or dataflash file. I am not so experienced, yet.

Thanks, Krisztian.

@kiki0000,
Try here for instructions on how to make a tlog or dataflash file.
Regards,
TCIII AVD

I have prepeared a tlog file. I have set ch7 function to 0 (disable), and ch8 function to passthrough. It is visible also on the tlog file that ch7 is working in auto function with the do set servo command (at ca. 52% of the tlog file) but moving the sticks has no effect on it and ch8 is not working in auto mode only with the sticks.
I hope this information is helpful for you.

Thank you very much your support in advance.

2016-08-23 18-46-30.tlog (411.7 KB)

Krisztian

Any ideas based on tlog file?
Thanks.

Krisztian

I’ve had a look at the log. RC8 looks like its working. I can see you moving the input stick and I can also see ardupilot outputting it on channel 8. RC_CHANNEL_RAW is the input channel - its what the ardupilot sees from the transmitter. SERVO_OUTPUT_RAW is what the ardupilot output’s on the respective channel. You can see the yellow line which corresponds to Channel 8 moves in both graphs which means when you move it on the transmitter ardupilot is passing it straight through to the output channel. Based on the log it looks like whatever is connected to channel 8 should be getting signal. Some things to check:
Are you sure you are plugged into the correct channel? Best to double check.
Have you go the servo rail powered correctly?
Can you plug in a simple servo to that channel and test?

INPUT

OUTPUT

Thanks, Grant.

Thank you very much your analysis. It is really very appretiated. I have connected everything to the right channel, I have tried already several versions. If I change the CH7 function also to pass through it is also working, but only in manual mode and not in auto mission mode. There are servos connected to both of the channels so it is visible if working or not. The servo rail is supplied by the ESC BEC according to the specification and it should be ok due to the reason that in manual mode and pass through it is ok. Maybe one more thing I have realised. If I set the channel functions to disabled and then I remove and after that re-apply the power to the board/ system in this case the servos can be triggered by the transmitter for maybe 1 second and after that not any more. It seems that something in the code is disabling the input channels to output after the setup/initialising phase. Now I have downloaded an older version of the firmware that can be modified with Arduino (I have basic knowledge with Arduino programming) but for the first time it is quite complicated and not easy to understand the whole code.
Do you have any proposal what to modify?
Or any other ideas?
Thank you very much your support and sorry for my bad english:).

Thanks, Krisztian

Can you please take a few photo’s of your boat especially to cabling in the APM and we will see if that helps at all.

If you have an APM you should only be running the 2.50 firmware as the 3.0.1 firmware is for 32 bit autopilots like Pixhawks only. In fact you shouldn’t be able to install it on an APM so if you have I’d love to know how.

Thanks, Grant.

1 Like

Unfortuantely I have already re-wired everything because I would like to modify the original firmware in arduino. Some pictures of my bait boat (wires are not nicely orgenized just plugged in, for sure finally it will look nice :)):


I would like to operate the holders on the 2 sides of the boat with 2 servos. These ones I would like to operate also in auto mission mode automatically (e.g. at night when I cannot see the boat) and also in manual mode if I do not use the auto mission, just remote control with the transmitter.
Until now I have used the 2.50 APM Rover firmware. Now I am trying to modifiy the 2.48 which is still arduino compatible. Maybe I have found something that can cause my problem in RC_Channel_aux.cpp file:

// @Param: FUNCTION
// @DisplayName: Servo out function
// @Description: Setting this to Disabled(0) will setup this output for control by auto missions or MAVLink servo set commands. any other value will enable the corresponding function
// @Values: 0:Disabled,1:RCPassThru,2:Flap,3:Flap_auto,4:Aileron,6:mount_pan,7:mount_tilt,8:mount_roll,9:mount_open,10:camera_trigger,11:release,12:mount2_pan,13:mount2_tilt,14:mount2_roll,15:mount2_open,16:DifferentialSpoiler1,17:DifferentialSpoiler2,18:AileronWithInput,19:Elevator,20:ElevatorWithInput,21:Rudder,24:Flaperon1,25:Flaperon2,26:GroundSteering,27:Parachute
// @User: Standard
AP_GROUPINFO(“FUNCTION”, 1, RC_Channel_aux, function, 0),

AP_GROUPEND

};

RC_Channel_aux *RC_Channel_aux::_aux_channels[RC_AUX_MAX_CHANNELS];
uint32_t RC_Channel_aux::_function_mask;

/// map a function to a servo channel and output it
void
RC_Channel_aux::output_ch(void)
{
// take care of two corner cases
switch(function)
{
case k_none: // disabled
return;
case k_manual: // manual
radio_out = radio_in;
break;
}
hal.rcout->write(_ch_out, radio_out);

This code menas that if I set RC function to disabled the servo will operate only in auto mission mode and if I set to manul/ pass through mode it will put the value of the rc input to the output but the auto mission will not have any influence on it. Maybe I should change something here.
Thanks,

Krisztián

Now I have checked and with the Mission Planner and I have managed to upload the Rover 3.0.1 version firmware to my APM 2.6 (at least it showed at the end of the process that it is done). How can I check if it is really done or not? It looks like it is working properly except my previously mentioned Auto/ Manual problem.

@kiki0000,
I believe that the last version of ArduRover that will load and run on an APM2.x is 2.50 though I could be wrong.
Regards,
TCIII AVD

I have just replicated what your seeing. You choose the Rover icon and it says Rover 3.0.1 so it seems like its uploading that version. But what happens is Mission Planner (MP) auto detects what type of board you have connected and it then loads the appropriate firmware - on my APM it loaded ArduRover v2.51-beta. If you connect to your APM board and go to the messages tab on the Flight Data screen it should show you the version number of the software on your APM.

3.0.1 does not run on APM’s. The 2.x release version numbers is for APMs.

Thanks, Grant.