Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
PaparazziSystem Class Reference

gz-sim System that connects NPS with the simulation. More...

+ Inheritance diagram for PaparazziSystem:
+ Collaboration diagram for PaparazziSystem:

Public Member Functions

void Configure (const gz::sim::Entity &entity, const std::shared_ptr< const sdf::Element > &, gz::sim::EntityComponentManager &ecm, gz::sim::EventManager &) override
 
void PreUpdate (const gz::sim::UpdateInfo &info, gz::sim::EntityComponentManager &ecm) override
 
void PostUpdate (const gz::sim::UpdateInfo &info, const gz::sim::EntityComponentManager &ecm) override
 
bool Ready () const
 

Private Member Functions

void FindModel (gz::sim::EntityComponentManager &ecm)
 

Private Attributes

gz::sim::Entity world_ {gz::sim::kNullEntity}
 
gz::sim::Entity model_ {gz::sim::kNullEntity}
 
gz::sim::Entity body_link_ {gz::sim::kNullEntity}
 
gz::sim::Entity motor_links_ [NPS_COMMANDS_NB]
 

Detailed Description

gz-sim System that connects NPS with the simulation.

  • Configure: find the aircraft model and its links
  • PreUpdate: apply the motor forces and torques
  • PostUpdate: read the state of the aircraft

Definition at line 167 of file nps_fdm_gz.cpp.

Member Function Documentation

◆ Configure()

void PaparazziSystem::Configure ( const gz::sim::Entity &  entity,
const std::shared_ptr< const sdf::Element > &  ,
gz::sim::EntityComponentManager &  ecm,
gz::sim::EventManager &   
)
inlineoverride

Definition at line 173 of file nps_fdm_gz.cpp.

References FindModel(), foo, and world_.

+ Here is the call graph for this function:

◆ FindModel()

void PaparazziSystem::FindModel ( gz::sim::EntityComponentManager &  ecm)
inlineprivate

Definition at line 233 of file nps_fdm_gz.cpp.

References body_link_, foo, gazebo_actuators, model, model_, motor_links_, gazebo_actuators_t::names, NPS_COMMANDS_NB, NPS_GAZEBO_AC_NAME, and world_.

Referenced by Configure(), and PreUpdate().

+ Here is the caller graph for this function:

◆ PostUpdate()

void PaparazziSystem::PostUpdate ( const gz::sim::UpdateInfo &  info,
const gz::sim::EntityComponentManager &  ecm 
)
inlineoverride

Definition at line 203 of file nps_fdm_gz.cpp.

References body_link_, foo, gravity(), gz_state, model_, and world_.

+ Here is the call graph for this function:

◆ PreUpdate()

void PaparazziSystem::PreUpdate ( const gz::sim::UpdateInfo &  info,
gz::sim::EntityComponentManager &  ecm 
)
inlineoverride

Definition at line 182 of file nps_fdm_gz.cpp.

References FindModel(), foo, gz_cmd, model_, motor_links_, and NPS_COMMANDS_NB.

+ Here is the call graph for this function:

◆ Ready()

bool PaparazziSystem::Ready ( ) const
inline

Definition at line 230 of file nps_fdm_gz.cpp.

References model_.

Field Documentation

◆ body_link_

gz::sim::Entity PaparazziSystem::body_link_ {gz::sim::kNullEntity}
private

Definition at line 259 of file nps_fdm_gz.cpp.

Referenced by FindModel(), and PostUpdate().

◆ model_

gz::sim::Entity PaparazziSystem::model_ {gz::sim::kNullEntity}
private

Definition at line 258 of file nps_fdm_gz.cpp.

Referenced by FindModel(), PostUpdate(), PreUpdate(), and Ready().

◆ motor_links_

gz::sim::Entity PaparazziSystem::motor_links_[NPS_COMMANDS_NB]
private

Definition at line 260 of file nps_fdm_gz.cpp.

Referenced by FindModel(), and PreUpdate().

◆ world_

gz::sim::Entity PaparazziSystem::world_ {gz::sim::kNullEntity}
private

Definition at line 257 of file nps_fdm_gz.cpp.

Referenced by Configure(), FindModel(), and PostUpdate().


The documentation for this class was generated from the following file: