32 #ifndef ROSFLIGHT_SIM_SIL_BOARD_H 33 #define ROSFLIGHT_SIM_SIL_BOARD_H 40 #include <gazebo/common/Plugin.hh> 41 #include <gazebo/common/common.hh> 42 #include <gazebo/gazebo.hh> 43 #include <gazebo/physics/physics.hh> 46 #include <rosflight_msgs/RCRaw.h> 122 void RCCallback(
const rosflight_msgs::RCRaw& msg);
152 bool imu_read(
float accel[3],
float* temperature,
float gyro[3], uint64_t* time_us)
override;
156 void mag_read(
float mag[3])
override;
173 void pwm_init(uint32_t refresh_rate, uint16_t idle_pwm)
override;
174 void pwm_write(uint8_t channel,
float value)
override;
178 float rc_read(uint8_t channel)
override;
185 bool memory_write(
const void* src,
size_t len)
override;
219 gazebo::physics::WorldPtr world,
220 gazebo::physics::ModelPtr model,
222 std::string mav_type);
224 #if GAZEBO_MAJOR_VERSION >= 9 225 gazebo::common::SphericalCoordinates sph_coord_;
231 #endif // ROSFLIGHT_SIM_SIL_BOARD_H
uint8_t backup_memory_[BACKUP_SRAM_SIZE]
static constexpr size_t BACKUP_SRAM_SIZE
double horizontal_gps_stdev_
gazebo::common::Time last_time_
gazebo::physics::WorldPtr world_
bool battery_voltage_present() const override
void baro_read(float *pressure, float *temperature) override
bool gnss_has_new_data() override
double gyro_bias_walk_stdev_
std::uniform_real_distribution< double > uniform_distribution_
void clock_delay(uint32_t milliseconds) override
bool memory_write(const void *src, size_t len) override
double airspeed_bias_range_
void memory_init(void) override
bool diff_pressure_present(void) override
gazebo::math::Vector3 GazeboVector
bool sonar_present(void) override
void led1_off(void) override
void mag_read(float mag[3]) override
const int * get_outputs() const
rosflight_firmware::GNSSData gnss_read() override
void mag_update(void) override
bool rc_lost(void) override
void sensors_init() override
bool backup_memory_read(void *dest, size_t len) override
bool gnss_present() override
double mag_bias_walk_stdev_
uint64_t next_imu_update_time_us_
void battery_voltage_set_multiplier(double multiplier) override
void sonar_update(void) override
void gazebo_setup(gazebo::physics::LinkPtr link, gazebo::physics::WorldPtr world, gazebo::physics::ModelPtr model, ros::NodeHandle *nh, std::string mav_type)
float sonar_read(void) override
ros::Time last_rc_message_
void backup_memory_write(const void *src, size_t len) override
void led1_on(void) override
float battery_current_read() const override
void backup_memory_clear(size_t len) override
void diff_pressure_read(float *diff_pressure, float *temperature) override
void pwm_init(uint32_t refresh_rate, uint16_t idle_pwm) override
void led0_on(void) override
std::normal_distribution< double > normal_distribution_
double acc_bias_walk_stdev_
uint32_t clock_millis() override
bool imu_read(float accel[3], float *temperature, float gyro[3], uint64_t *time_us) override
rosflight_msgs::RCRaw latestRC_
gazebo::common::Time boot_time_
double vertical_gps_stdev_
void backup_memory_init() override
void board_reset(bool bootloader) override
float battery_current_multiplier
gazebo::physics::LinkPtr link_
void imu_not_responding_error() override
bool new_imu_data() override
double airspeed_bias_walk_stdev_
bool battery_current_present() const override
void led1_toggle(void) override
void RCCallback(const rosflight_msgs::RCRaw &msg)
void gnss_update() override
double gps_velocity_stdev_
void pwm_disable(void) override
float battery_voltage_read() const override
uint64_t clock_micros() override
void battery_current_set_multiplier(double multiplier) override
uint16_t num_sensor_errors(void) override
float battery_voltage_multiplier
double baro_bias_walk_stdev_
void diff_pressure_update(void) override
bool baro_present(void) override
float rc_read(uint8_t channel) override
void baro_update(void) override
GazeboVector inertial_magnetic_field_
bool mag_present(void) override
std::default_random_engine random_generator_
void init_board(void) override
gazebo::physics::ModelPtr model_
uint64_t imu_update_period_us_
void rc_init(rc_type_t rc_type) override
rosflight_firmware::GNSSFull gnss_full_read() override
void led0_off(void) override
void led0_toggle(void) override
void pwm_write(uint8_t channel, float value) override
bool memory_read(void *dest, size_t len) override