-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Manual Control Input via UDP #22406
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
base: main
Are you sure you want to change the base?
Manual Control Input via UDP #22406
Conversation
36415f6
to
7726840
Compare
How do I fix the issue |
3fd9822
to
8d45c5b
Compare
How is this different than manual control input on UDP over mavlink? Smaller packets? |
The package size was not the main motivation. But if you want to know, it's between 22 and 46 bytes, depending on how many AUX channels you send. Compared to MAVLink, this has much fewer dependencies and is easier to set up. See the Python example client. |
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.
Could you please change the naming, we've always used mc
to consistently mean multicopter
.
I personally think most people should be using either mavlink, uxrce_dds, or zenoh for this and if dependencies/complexity are truly an issue we could figure out how to make that more palatable. That being said I'm also not opposed to a super simple standalone example like this, let's just make sure it's not confused with anything else.
|
Since you're specifying an UDP protocol message. Can you include also the endianness of the bytes and the method to represent the float (ie. IEEE 754). Different CPU architectures can misread the message because of that. |
I am fine with the renaming. However, I don't think "example" is a good fit. It would be an example for what? I think this module is somewhat similar to |
I added this to the documentation. |
8d45c5b
to
a30283b
Compare
I pulled the Mac OS CI change into main. 1cf38e9 |
It's not the best naming/solution at the moment, but it's more of a place we can keep experiments off to the side until they're fully supported. This isn't being built or tested on any boards, no testing in CI, and for now the "official" recommendation for manual control should still be mavlink, and XRCE DDS. |
e535ca9
to
f91c084
Compare
f91c084
to
ecdd86f
Compare
@dagar I renamed the module and moved it to the examples. Is this ok now? Other than this, I am only left with the CI telling me that |
677ede0
to
14fc18e
Compare
f2cd1d1
to
686ee34
Compare
@dagar Can you have a look at this again? The remaining CI issue ( |
686ee34
to
9aa5bad
Compare
@@ -0,0 +1,43 @@ | |||
# Manual Control Input via UDP | |||
|
|||
This module listens to manual control messages on a UDP port and republishes them to uORB topic `manual_control_input`. The UDP port (default: `51324`) can be set via parameter `p`. |
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.
My understanding is that this demonstrates how a driver can monitor the UDP port, parse an input stream, and publish to a uORB topic. It happens to use the example of parsing a MAVLINK_CONTROL message and writing to the manual_control_input
topic (defined in ManualControlSetpoint.
Thoughts:
- What does this example show that is not shown in other examples?
- Its an example. Is everything else about the example best-practise - including documentation etc.
- Should the docs of this be in the user guide, along with an explanation of the code?
- Is the example tested - if the interface changes for the uorb topic, when would we find out?
- This is not the way you would normally handle the input of this mavlink message - we do it in the mavlink module. We should spell out what this shows, what it is for, and this limitation.
ManualControlSetpoint
is poorly documented. What is the implication of updating the topicmanual_control_input
and how does this differ from updatingmanual_control_setpoint
? I.e. is this just what MAVLink does now - update the input - and other code then works with the other possible inputs to set the setpoint topic?
I guess the summary is that this is cool, but we should make sure that we make implications clear and look at ways to make sure we know if it ever breaks.
This PR adds a new module
mc_in_udp
that listens on a UDP port for a list of float values that are translated intomanual_control_setpoint_s
messages and published on uORB topicmanual_control_input
. It can be used for remote control without MAVLink.The message format, including a simple example client in Python, is documented in the README.
Changelog Entry
For release notes:
Test coverage
Tested with C++ and Python clients using jMAVSim with SITL.