-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
px4-ros2 offboard control with pyrhon example #1675
Comments
@JinraeKim thanks for the suggestion. We are open for contributions in this regard from anyone willing to do them. Are you open to contribute in this regard? Thank you |
Thank you for your reply. |
@JinraeKim Could you maybe elaborate if there is a specific reason you are trying to use python for offboard control? |
I would guess the same reason everyone uses Python when they are starting - it's a much easier language to learn. |
@hamishwillee I totally agree, but more wondering if we should enable beginners use ROS2 + offboard. Since the use case of ROS2 with PX4 is motivated by removing the performance bottlenecks coming from using mavlink, I was trying to understand why one would use python ROS2 with PX4. IMO, it is safer to use mavsdk-python if the developer is starting out and does not understand what is going on inside PX4. |
@Jaeyoung-Lim Howdy! My take on this is that this is a matter of setting expectation - what can you do with each framework and programming language? What is easier for what task? What are the limits? There is no point telling a beginner "go and use MAVSDK" if that isn't going to get the performance they need for the task at hand. Some questions
If the answer is "Python is a peer of C++ for ROS" then we should try have an example of that too. And here we should compare and contrast, with some kind of useful comparison of the options. Can you give me some idea of where the border for usage is? Normally we say:
|
It is because I'm familiar with Python and ROS2, not with C++ (main language is Julia though). Honestly, there are too many choices to use PX4 so I'm not sure my plan is suitable for my research. |
A nice summary! |
As above, you need to start with "what you want to achieve" and that will determine the path you take. I have tried to integrate above summary in #1681 . I personally don't propose to create any Python ROS examples - though if someone wants to that would be great. I consider it a minor bug that we don't. |
@JinraeKim I have tried to write a python version of offboard control, and it behaves the same as the original C++ version. |
…ranch in our fork for python-based offboard mode
I wanted to close this as stale, but I think it is still relevant to provide/link to at least one PX4 ROS2 Python example. The example provided by @haotianh9 in PX4/px4_ros_com#129 was probably OK at the time but was never reviewed, and right now it would not fit well with the current structure of px4_ros_com. @beniaminopozzan @Jaeyoung-Lim Can we look at https://github.com/PX4/px4_ros_com/blob/main/src/examples/offboard_py/offboard_control.py and decide if it does what we need as a basic Python example (My thinking is that it would be nice if it also emitted telemetry)? IF the example is OK then who has Python skills to document this (I could have a go once the script is considered to deliver what a ROS/PX4 user would expect). If no one is able/willing to get this over the line I will close this issue. |
@hamishwillee AFAIK, The best example I have is this: https://github.com/Jaeyoung-Lim/px4-offboard |
Thansk @Jaeyoung-Lim, I have linked your repo in #3560. It would be better to have this as part of the official examples source and with documentation in the guide, but this is still way more helpful than nothing.
Not while we're still supporting v1.13 as it is a requirement. I have no idea what point we decide we let old versions slide. For versions 1.14 and later it is still where we point users to for examples, so we can't shouldn't deprecate it unless that changes. |
There is a cpp script for offboard control example, but it would be also helpful to provide some launchable python codes for the same example as ros2 usually supports both languages.
The text was updated successfully, but these errors were encountered: