-
Notifications
You must be signed in to change notification settings - Fork 221
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
added python example to read offbaord position setpoints from a csv file #600
Conversation
…ile pos,vel,acc,etc
Amazing, that's very cool, thanks for that! As soon as MAVSDK 2 is out we will have the new offboard API and can adapt this. |
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.
This is nice and clear.
Just please fix the issues pycodestyle has:
https://github.com/mavlink/MAVSDK-Python/actions/runs/5145846010/jobs/9270623388?pr=600
And then I'll merge it.
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.
Pretty cool!
updated white spaces and long line length
…a787b/MAVSDK-Python into offboard_from_csv_example just changing folder name and styling
changed folder name
…a787b/MAVSDK-Python into offboard_from_csv_example fixing styles
thanks by the way. What is mavsdk 2? an update to the current system? I haven't heard of it |
MAVSDK 2 is basically the main branch of MAVSDK. Also see: mavlink/MAVSDK#2002 |
This PR introduces a new Python example that demonstrates how to perform offboard control with position setpoints read from a CSV file. This example can be useful for developers who want to design complex maneuvers for their drones using pre-calculated trajectories.
The new example, located in the examples/from_csv folder, includes the following features:
A script (offboard_from_csv.py) that reads position, velocity, and acceleration setpoints from a CSV file and sends these setpoints to a connected drone in offboard mode.
A well-documented codebase, explaining each part of the code in detail, the structure of the CSV file, and the meaning of different mode codes used in the script.
A plotted image of the trajectory, providing a visual representation of the intended path of the drone.
In addition, If you remember last week, I added function for the set_position_velocity_acceleration_ned function to the MAVSDK with your great supportive help now that it is merged I decided to add an exmaple so people know how to use it.
However, as of May 2023, this function is not available in the default MAVSDK-Python installation via pip3. For this reason, I've currently commented out the section of code using this function in the example script.
The example is designed in such a way that users can easily uncomment this section and switch to set_position_velocity_acceleration_ned when it becomes available in the default installation. This will allow the users to input acceleration setpoints in addition to position and velocity.
I look forward to your feedback and am open to making any necessary changes.