byu-magicc / rosplane

A basic fixed-wing autopilot for ROS - based on the textbook "Small Unmanned Aircraft: Theory and Practice" by Randy Beard and Tim McLain
98 stars 47 forks source link

Integration with rosflight_plugins #42

Closed plusk01 closed 7 years ago

plusk01 commented 7 years ago

PR https://github.com/byu-magicc/rosflight_plugins/pull/3 is mainly cosmetic and shouldn't break anything, but just so you know it is up there.

Sensor parameters are no longer passed through the xacro -- they should be passed through the rosparam server now. ROScopter adds the parameters to the multirotor.yaml param file that is loaded on a roslaunch: https://github.com/byu-magicc/roscopter/blob/master/roscopter_sim/params/multirotor.yaml

Also, https://github.com/byu-magicc/rosflight_plugins/issues/5 highlights that the airspeed sensor just publishes as fast as it can -- this should probably be changed.

plusk01 commented 7 years ago

Oh, and @skyler237 I changed the airspeed param names from:

  airspeed_topic_ = nh_->param<std::string>("airspeedTopic", "airspeed/data");
  pressure_bias_ = nh_->param<double>("pressureBias", 0);
  pressure_noise_sigma_ = nh_->param<double>("pressureNoiseSigma", 0);
  rho_ = nh_->param<double>("airDensity", 1.225);
  max_pressure_ = nh_->param<double>("maxPressure", 4000.0);
  min_pressure_ = nh_->param<double>("minPressure", 0.0);

to


  airspeed_topic_ = nh_private_.param<std::string>("airspeed_topic", "airspeed/data");
  pressure_bias_ = nh_private_.param<double>("pressure_bias", 0);
  pressure_noise_sigma_ = nh_private_.param<double>("pressure_noise_sigma", 0);
  rho_ = nh_private_.param<double>("air_density", 1.225);
  max_pressure_ = nh_private_.param<double>("max_pressure", 4000.0);
  min_pressure_ = nh_private_.param<double>("min_pressure", 0.0);

(lower case now). This was to make them more consistent with the other sensor plugin params.

gellings commented 7 years ago

Thanks @plusk01