Skip to content
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

Is the MPC part not open source? How to run SUPER on a real drone? #5

Open
hcws opened this issue Feb 18, 2025 · 1 comment
Open

Is the MPC part not open source? How to run SUPER on a real drone? #5

hcws opened this issue Feb 18, 2025 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@hcws
Copy link

hcws commented Feb 18, 2025

Thank you for your open source. Is the MPC part not open source? If we want to reproduce it, how can we replace it?

@RENyunfan
Copy link
Collaborator

Thank you for your question, and I apologize for not having the time to write a guide on real-world deployment yet. However, I am here to actively support you during your deployment process, and I hope this issue will assist others who wish to replicate it.

Currently, the SUPER publishes the committed trajectory in two ways.

The first and easier method uses position, velocity, acceleration, jerk, yaw, and yaw_dot from the following code snippet:

// https://github.com/hku-mars/SUPER/blob/master/super_planner/include/ros_interface/ros1/fsm_ros1.hpp#L281
cmd_pub = nh_.advertise<quadrotor_msgs::PositionCommand>(cfg_.cmd_topic, 10);

This can be input to the open-source PX4 high-level controller found here: PX4 Controller. Please note that the quadrotor_msgs may not be identical and could fail the MD5 check, causing ROS communication issues. We haven't tested it with px4ctrl, but copying PositionCommand.msg in mars_quadrotor_msgs to px4ctrl and recompiling the workspace may resolve this.

The second and more advanced method utilizes the published polynomial trajectory, which is suitable for an MPC controller. This allows the controller to evaluate multiple reference states along the trajectory for predictive control:

// https://github.com/hku-mars/SUPER/blob/master/super_planner/include/ros_interface/ros1/fsm_ros1.hpp#L282
mpc_cmd_pub_ = nh_.advertise<quadrotor_msgs::PolynomialTrajectory>(cfg_.mpc_cmd_topic, 10);

However, please note that the MPC module of SUPER is not yet open-sourced, but we plan to release it later this year. If you're interested in trying this method, you may need to implement it yourself in the meantime.

I will keep this issue open until I have time to create a comprehensive guide on real-world deployment. If you succeed and are willing to share your insights, I encourage you to document your experience here. I will reference this issue in the README to assist anyone looking to deploy SUPER on a real-world drone.

@RENyunfan RENyunfan added the documentation Improvements or additions to documentation label Feb 18, 2025
@RENyunfan RENyunfan changed the title Is the MPC part not open source? Is the MPC part not open source? How to run SUPER on a real drone? Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants