-
Notifications
You must be signed in to change notification settings - Fork 13.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding the Mavlink handler for the Actuator controls message #7477
Conversation
NOTE: The actuator group 6 is not implemented in the rest of the code, so it is still not in the not implemented in the mavlink receiver. https://dev.px4.io/en/concept/mixing.html#control-group-6-first-payload |
Can you test? |
I would like to, but I have a deadline on rovers on Tuesday. I should be able to test from Wednesday onwards. |
I just tested it today and it worked as expected. Yet I did not tested it in flight as the weather is very bad right now. Gripper: EPM OpenGrab v3 http://ardupilot.org/copter/docs/common-electro-permanent-magnet-V3.html Test yourself:
Info:
Code:
|
@AlexisTM did you flight test this already? |
Badly no. As soon as I have time I can allow to it, I will do test flights. |
Ok. Since this was pendent for a month, would be good to get this is ASAP, as I think it is useful. |
@AlexisTM ping |
I've tested and it works for me #7854 |
Also seems working for me. Thanks @andresR8 for testing. I can put #4965 inside this PR, yet, I'll not be able to test it as we are using the Offboard control and not the Navigator. If you confirm it, I'll put the changes of https://github.com/PX4/Firmware/pull/4965/files?diff=split#diff-3f698c24ebab3cb3866d13e69f8e5459 |
It can be tested on SITL, though I think it was already tested on that PR and validated by @LorenzMeier. I suppose you can push all the #4965 PR to this one and recheck if the changes on the mixers make sense. |
@LorenzMeier had concerns about the mixers. It has to be checked first. |
That's what I stated here basically. |
I've realized that when i'm sendig actuator control values to a group 0 and any other group at the same time, the group 0 is overriten to zeros for a short time. I dont know why. I'm setting two different actuator control messages in ros, that's basically what I'm doing:
|
@andresR8 try to setup a delay from one msg to the other in order to avoid concurrency issues. |
@TSC21 It works with the delay, thanks |
@TSC21 Where would the concurrency be issue located? Mavros or PX4? |
It can be on both. But I suppose that it will start on the ROS side |
To be rebased |
Hi all, I am working on a project which involves controlling several servos from PIXHAWK AUX outputs. My setup is: PX4 v1.7.3 Pixhawk 2.4.6 |
Hey @alanypf, the following PR is not merged to the master. I just rebased it so there is no merge conflicts. By Pixhawk 2.4.6, I guess you mean Pixhawk 1, version 2.4.6? Could you try to apply this PR, upload it to your Pixhawk and try again? |
Hi @AlexisTM, yes, I use Pixhawk 1.Thank you for your reply. I will test it as soon as I come back to UNI.I will let you know the result in next Monday. |
Hi all and @AlexisTM , |
NOTE: This confirms it works fine but it is (if I understood well) not flying. |
Any update? If I understand correctly there is currently no way to control a gimbal pitch by companion computer? |
@ArkadiuszNiemiec This mainly require in-flight testing. I have no gimball installed to do so. |
@AlexisTM Ok, I have built a 1.8.0 version of |
@ArkadiuszNiemiec I am happy to hear that it works well! [This PR is waiting for 1+ year, shame on me] If you can; try to validate to add a gripper and use two different mixer group at the same time. Except form that, I don't know where the problems could lie. |
@AlexisTM I apologize for the review delay. This PR looks good to me. Please rebase on current master and I'll merge. |
Rebased on current master |
- Allow to use the 4 groups from Mavlink - Allow an Offboard control of the Gimball, Gripper or servoes. Fixes issue #7440 Still need to be tested Signed-off-by: Alexis Paques <alexis.paques@gmail.com>
Signed-off-by: Alexis Paques <alexis.paques@gmail.com>
Rebased to current master to retrigger the build. |
Does this work only in OFFBOARD mode? |
@mzahana I believe it works only in OFFBOARD. |
Restarting CI after #10203. |
_actuator_controls_pub = orb_advertise(ORB_ID(actuator_controls_0), &actuator_controls); | ||
switch (set_actuator_control_target.group_mlx) { | ||
case 0: | ||
if (_actuator_controls_pubs[0] == nullptr) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once last nitpicky thing, can you change these into orb_publish_auto? It includes the nullptr check and initiate advertise in a single call.
https://github.com/PX4/Firmware/blob/master/src/modules/uORB/uORB.h#L177
EDIT: Nevermind, you can't do this because the actuator controls will go to a separate instance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
int inst
orb_publish_auto(ORB_ID(actuator_controls_0), &_actuator_controls_pubs[0], &actuator_controls, inst, ORB_PRIO_DEFAULT)
@mzahana Yes; this is only for the offboard mode: https://github.com/PX4/Firmware/blob/82acf6894ddf8932ed83e3c4fecd8b82edc633bd/src/modules/mavlink/mavlink_receiver.cpp#L1111 |
Hi all, |
Fixes issue #7440
Do not merge yet, I still have to test it.
Signed-off-by: Alexis Paques alexis.paques@gmail.com