Auterion / px4-jsbsim-bridge

JSBSim bridge for PX4 SITL/HITL simulations
BSD 3-Clause "New" or "Revised" License
26 stars 38 forks source link

Rotor torque being multiplied by a moment arm? #21

Open seanmcleod opened 4 years ago

seanmcleod commented 4 years ago

In the hexarotor and quadrotor models why is the net torque being multiplied by a moment arm?

https://github.com/Auterion/px4-jsbsim-bridge/blob/263da94dfd74355e6ddc9298caab9fec306d3ec7/models/hexarotor_x/hexarotor_x.xml#L586-L597

Jaeyoung-Lim commented 4 years ago

@mvacanti Could you share any insights?

mvacanti commented 4 years ago

@seanmcleod & @Jaeyoung-Lim Good catch. This is a holdover from previous work. Should be:

 <axis name="YAW"> 
     <function name="aero/rotor_yaw"> 
     <description>Rotor Yaw</description> 
     <sum> 
         <property>fcs/net_torque</property> 
         <property>fcs/torque_bypass</property> 
     </sum> 
   </function> 
 </axis> 
seanmcleod commented 4 years ago

What are fcs/torque_bypass and fcs/lift_bypass[x] for?

mvacanti commented 4 years ago

@seanmcleod these were properties I was using to test performance in JSBSim via telnet / scripts to evaluate model performance. It allowed me to 1. Isolate PX4 outputs in respect to vehicle movement (hold vehicle stationary or cause it to move in manner controlled explicitly by JSBSim) 2. Introduce disruptions to observe PX4 response. Can be simplified but believe the above are valuable uses.

seanmcleod commented 4 years ago

@mvacanti so maybe they're not named ideally? Maybe something like external_torque_disturbance?

I had searched through the rest of the model files and also the bridge source code for references and couldn't find any.

mvacanti commented 4 years ago

@seanmcleod yes they could be renamed - I chose bypass as it was bypassing PX4 commands. There should not be any references to the properties as I was strictly utilizing them through JSBSim Telnet or the script files (not published here) - though if they cause confusion than they should be removed.

seanmcleod commented 4 years ago

@mvacanti yep I meant since I couldn't find any references to them in the rest of the repo it was difficult to figure out what they were being used for so was just guessing based on the bypass in the names.

Wouldn't necessarily remove them, rather add a comment in the xml explaining what they can be used for and possibly rename them.