diff options
author | Thomas Gubler <thomasgubler@gmail.com> | 2015-02-02 23:02:42 +0100 |
---|---|---|
committer | Thomas Gubler <thomasgubler@gmail.com> | 2015-02-04 21:34:56 +0100 |
commit | 18cc20b04b735c19607636a99f0656602d3d6fee (patch) | |
tree | 3bd4cd65b3a65d0cc57d44018db3644254b6f4ee /src/platforms/ros | |
parent | 515266c1632e6b891f34d8047621c2e0e1d72a75 (diff) | |
download | px4-firmware-18cc20b04b735c19607636a99f0656602d3d6fee.tar.gz px4-firmware-18cc20b04b735c19607636a99f0656602d3d6fee.tar.bz2 px4-firmware-18cc20b04b735c19607636a99f0656602d3d6fee.zip |
parametrize imu input for ros dummy att estimator
Diffstat (limited to 'src/platforms/ros')
-rw-r--r-- | src/platforms/ros/nodes/attitude_estimator/attitude_estimator.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/platforms/ros/nodes/attitude_estimator/attitude_estimator.cpp b/src/platforms/ros/nodes/attitude_estimator/attitude_estimator.cpp index 1d36e3d99..a3e4bca30 100644 --- a/src/platforms/ros/nodes/attitude_estimator/attitude_estimator.cpp +++ b/src/platforms/ros/nodes/attitude_estimator/attitude_estimator.cpp @@ -48,9 +48,11 @@ AttitudeEstimator::AttitudeEstimator() : _n(), // _sub_modelstates(_n.subscribe("/gazebo/model_states", 1, &AttitudeEstimator::ModelStatesCallback, this)), - _sub_imu(_n.subscribe("/px4_multicopter/imu", 1, &AttitudeEstimator::ImuCallback, this)), _vehicle_attitude_pub(_n.advertise<px4::vehicle_attitude>("vehicle_attitude", 1)) { + std::string vehicle_model; + _n.param("vehicle_model", vehicle_model, std::string("iris")); + _sub_imu = _n.subscribe("/" + vehicle_model + "/imu", 1, &AttitudeEstimator::ImuCallback, this); } void AttitudeEstimator::ModelStatesCallback(const gazebo_msgs::ModelStatesConstPtr &msg) |