MCPcopy Create free account
hub / github.com/KumarRobotics/sloam / PublishOdomAsTf

Method PublishOdomAsTf

sloam/src/core/inputNode.cpp:276–291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

274}
275
276void 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
293int main(int argc, char **argv)
294{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected