Giter Club home page Giter Club logo

Comments (10)

maciejmatuszak avatar maciejmatuszak commented on August 13, 2024 1

Thank you for your support, I decided on a compromise the Visual Odometry works really nice with 400Hz IMU, so I run that and MSF at 400Hz and then publish odometry from MSF at 50Hz (every 8'th frame) to nMPC. The DJI N3 controller need some tuning but it works well, I tested it with step responses in square: https://www.youtube.com/watch?v=3LoL0Xdj7PY
Thank you again!

from mav_dji_ros_interface.

fmina avatar fmina commented on August 13, 2024

The attitude/z_velocity is deprecated. It was the first version we tested, now the interface supports attitude thrust. I would stick with attitude thrust in [N].

from mav_dji_ros_interface.

maciejmatuszak avatar maciejmatuszak commented on August 13, 2024

The instructions for collecting the data https://github.com/ethz-asl/mav_dji_ros_interface/wiki/Dynamic-System-Identification (the table on top) indicate input as dji_sdk/vc_cmd/thrust/* and output as dji_sdk/velocity/*. Are you saying those instructions are outdated?
Is there falcon2_sysid_height_onboard.m equivalent dealing with acceleration rather than velocity?

from mav_dji_ros_interface.

maciejmatuszak avatar maciejmatuszak commented on August 13, 2024

Was thinking some more about it, the scripts for roll, pitch calculate the 1'st and 2'nd order transfer function parameters from roll command to roll taken from imu orientation, same for pitch and yaw rate. angle to angle, angle rate to angle rate. However thrust transfer function parameters are calculated from trust.z command to vertical velocity?
Should that be force to force function I mean from thrust.z to imu.linear_acceleration.z * uav_mass? The MPC is going to send the thrust.z command as Newtons. Am I missing something here?
@inkyusa Inku, I notice you have been working on those scripts, can you shade some light on this?
regards Maciej

from mav_dji_ros_interface.

maciejmatuszak avatar maciejmatuszak commented on August 13, 2024

OK, I think I found what it is about. The paper dealing with dynamic system identification mention that the DJI SDK only allows for the command to control velocity and not acceleration.

  1. Stick inputs: The common transmitter inputs are pitch,
    roll angles ( rad), yaw rate ( rad/s), and thrust (N). However, the vertical stick input of the platform is velocity (m/s) that permits easier and safer manual flight. To address this different, we use a classic PID vertical position controller alongside linear MPC horizontal position controller.

Is that still the case in the master branch of mav_control_rw? If I understood the code correctly the nonlinear mpc in master branch is using transfer functions of first and second order for roll, pitch and yaw rate, but I can only find the penalty values for the thrust: q_z, q_vz, r_thtust. Do not see any references to PID in the code.

My plan is to use this config: https://github.com/ethz-asl/mav_dji_ros_interface/blob/master/dji_interface/launch/raven_indoor_rovio_nMPC_trj.launch. Plugin the transfer function parameters from roll, pitch, yaw_rate experiments and change the sampling_time parameter to match the 400Hz IMU and MSF pose stream from N3 controller.

If you see any problem with this approach please let me know.

from mav_dji_ros_interface.

fmina avatar fmina commented on August 13, 2024

Since we wrote the new interface, we use roll, pitch yaw rate and thrust [N]. Z velocity is not used, and no identification beside roll/pitch dynamics is needed.

I don't think you need to run MSF/NMPC at 400 Hz, that's too much. I would go for 50, max 100 Hz if the serial communication doesn't give issues.

from mav_dji_ros_interface.

fmina avatar fmina commented on August 13, 2024

@inkyusa I think we should update the documentation of the SysID to match what we have in this repo.

from mav_dji_ros_interface.

maciejmatuszak avatar maciejmatuszak commented on August 13, 2024

Thanks @fmina !
What you say matches my understanding of the code and the parameters in the config file.
I also was thinking to drop the frequency, the serial communication copes quite well with 400Hz via USB/Serial converter but the tasks that process the data seems to be heavy on CPU.
What a shame to drop the yaw transfer function in my case it fits the validation data with 91% accuracy :)

Maciej

from mav_dji_ros_interface.

inkyusa avatar inkyusa commented on August 13, 2024

Since we have changed control input interface from virtual RC that sends roll angle, pitch angle, yaw rate, and vertical velocity to thrust command (all same except sending 0-100% thrust command instead vertical velocity as Mina mentioned).
I created another dynamic system identification page for thrust command and we will update in an early manner.
If this issue resolved, please close it.
Best,

from mav_dji_ros_interface.

fmina avatar fmina commented on August 13, 2024

I will close this. Please reopen if needed.

from mav_dji_ros_interface.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.