simple_offboard: relax position_msg timestamp update rules (#264)

* simple_offboard: Relax position_msg timestamp update rules

* Little code style change

Co-authored-by: Oleg Kalachev <okalachev@gmail.com>
This commit is contained in:
Alexey Rogachevskiy
2020-08-04 13:19:58 +03:00
committed by GitHub
parent ebeb3f58d6
commit 17c210919d

View File

@@ -417,8 +417,9 @@ void publish(const ros::Time stamp)
}
if (setpoint_type == POSITION || setpoint_type == NAVIGATE || setpoint_type == NAVIGATE_GLOBAL) {
position_msg.header.stamp = stamp;
if (setpoint_yaw_type == YAW || setpoint_yaw_type == TOWARDS) {
position_msg.header.stamp = stamp;
position_pub.publish(position_msg);
} else {