Closed XinChen-stars closed 1 day ago
Hello,
Yes the quadrotor dynamics have quaternions in them. By initializing it all to zero it will throw nans when doing update state here https://github.com/ACDSLab/MPPI-Generic/blob/main/include/mppi/dynamics/quadrotor/quadrotor_dynamics.cu#L182C24-L182C77.
Just use the method getZeroState https://github.com/ACDSLab/MPPI-Generic/blob/main/include/mppi/dynamics/quadrotor/quadrotor_dynamics.cu#L212 to get a valid initial state.
I will make a note to move the examples to using the getZeroState method to prevent this issue in the future.
Thank you for your reply! I solved this problem by using the method getZeroState:
state_array current_state_ = system_dynamics_->getZeroState();
Hi, thank you for sharing the code!
Description
I tried following the MPC Usage: Listing 2 & Listing 3 the cartpole_plant_example running result: However,when trying to run the quadrotor example it returned the following error: quadrotor plant code :
quadrotor example code :
Is there anything I am overlooking on coding an quadrotor example?