Giter VIP home page Giter VIP logo

Comments (10)

pascalau avatar pascalau commented on July 23, 2024 1

I identified the issue for the incorrect parameter estimation. The actuator input for feature calculation is given in rpm and normalized using the function normalize_actuators() which assumes that the rpm is bounded between 1000 and 2000 rpm. And normalizes this range between [0,1]. The resulting actuator input has a mean of around 0.5. During simulation I observed that the actuator input also has a range between [0,1] but a mean of 0.7 which means that the a actuator input value of 0 corresponds to 0 rpm and 1 to 2000 rpm. I don't now what program/node publishes the actuator input, but setting the lower bound of normalize_actuators() to 0 instead of 1000 allows the regression to estimate more or less the original values.

from data-driven-dynamics.

pascalau avatar pascalau commented on July 23, 2024

parameters.zip
Here are the parameters for the simulation and the estimated parameters from the log.

from data-driven-dynamics.

Jaeyoung-Lim avatar Jaeyoung-Lim commented on July 23, 2024

@pascalau Awesome work!

normalize_actuators() to 0 instead of 1000 allows the regression to estimate more or less the original values.

Is this regarding

?

@manumerous It seems like @pascalau solved the problem!

from data-driven-dynamics.

pascalau avatar pascalau commented on July 23, 2024

Does anyone now what provides actuator_input to the plugin and how these values are mapped to rotor rpm?

from data-driven-dynamics.

pascalau avatar pascalau commented on July 23, 2024

Is this regarding

Yes

from data-driven-dynamics.

Jaeyoung-Lim avatar Jaeyoung-Lim commented on July 23, 2024

@pascalau So on the simulation side, the thrust is being calculated by the rotor velocity (RPM) in the gazebo_motor_model plugin in

https://github.com/PX4/PX4-SITL_gazebo/blob/27298574ce33a79ba6cfc31ed4604974605e7257/src/gazebo_motor_model.cpp#L201

This message comes from the gazebo_mavlink_interface, which receives the normalized actuator commands from PX4 and scales them to rpm commands

https://github.com/PX4/PX4-SITL_gazebo/blob/27298574ce33a79ba6cfc31ed4604974605e7257/src/gazebo_mavlink_interface.cpp#L1115-L1124

The relevant parameters such as input offset and input scaling are defined in the sdf file as is

<channel name='rotor1'>
<input_index>0</input_index>
<input_offset>0</input_offset>
<input_scaling>2</input_scaling>
<zero_position_disarmed>0</zero_position_disarmed>
<zero_position_armed>0</zero_position_armed>
<joint_control_type>velocity</joint_control_type>
</channel>

I know this is a bit convoluted but hope you can navigate through the problem :)

from data-driven-dynamics.

pascalau avatar pascalau commented on July 23, 2024

If I see this correctly the model used for the simulation is:
https://github.com/PX4/PX4-SITL_gazebo/blob/27298574ce33a79ba6cfc31ed4604974605e7257/models/iris/iris.sdf.jinja#L353-L369
Which implies that the range [0,1] should be mapped to [0,2200] because of the inputscaling of 2 and the maxRotVelocity of 1100.

from data-driven-dynamics.

Jaeyoung-Lim avatar Jaeyoung-Lim commented on July 23, 2024

@pascalau Ah your right the pre-estimation model is that one and your probably right.

So basically the estimated models all had the wrong input scaling and that is where the difference of behavior was coming from

from data-driven-dynamics.

pascalau avatar pascalau commented on July 23, 2024

A max_output value of 2200 does not lead to the same parameters as the groundtruth. I'm not sure if I am missing something.

from data-driven-dynamics.

manumerous avatar manumerous commented on July 23, 2024

That is very cool! Good catch!

I had a quick look at the parameters and they seem to be close enough as you said.

If it is true that the iris has a max output of 2200 it would be good to add the min/max output values to the config of each vehicle. This way the normalization could be adapted to each vehicles need.

from data-driven-dynamics.

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.