| 274 | } |
| 275 | |
| 276 | void InputManager::PublishOdomAsTf(const nav_msgs::Odometry &odom_msg, |
| 277 | const std::string &parent_frame_id, |
| 278 | const std::string &child_frame_id) |
| 279 | { |
| 280 | geometry_msgs::TransformStamped tf; |
| 281 | tf.header = odom_msg.header; |
| 282 | // note that normally parent_frame_id should be the same as |
| 283 | // odom_msg.header.frame_id |
| 284 | tf.header.frame_id = parent_frame_id; |
| 285 | tf.child_frame_id = child_frame_id; |
| 286 | tf.transform.translation.x = odom_msg.pose.pose.position.x; |
| 287 | tf.transform.translation.y = odom_msg.pose.pose.position.y; |
| 288 | tf.transform.translation.z = odom_msg.pose.pose.position.z; |
| 289 | tf.transform.rotation = odom_msg.pose.pose.orientation; |
| 290 | broadcaster_.sendTransform(tf); |
| 291 | } |
| 292 | |
| 293 | int main(int argc, char **argv) |
| 294 | { |
nothing calls this directly
no outgoing calls
no test coverage detected