18 #ifndef COB_OMNI_DRIVE_CONTROLLER_PARAM_PARSER_H 19 #define COB_OMNI_DRIVE_CONTROLLER_PARAM_PARSER_H 30 urdf::Pose transform_pose;
33 urdf::JointConstSharedPtr joint(model->getJoint(joint_name));
37 <<
" couldn't be retrieved from model description");
41 transform_pose.position = joint->parent_to_joint_origin_transform.position;
42 transform_pose.rotation = joint->parent_to_joint_origin_transform.rotation;
43 while(joint->parent_link_name != parent_link_name)
45 urdf::LinkConstSharedPtr link_parent(model->getLink(joint->parent_link_name));
46 if (!link_parent || !link_parent->parent_joint)
49 <<
" couldn't be retrieved from model description or his parent joint");
52 joint = link_parent->parent_joint;
53 transform_pose.position = transform_pose.position + joint->parent_to_joint_origin_transform.position;
54 transform_pose.rotation = transform_pose.rotation * joint->parent_to_joint_origin_transform.rotation;
61 trans.
setOrigin(tf2::Vector3(transform_pose.position.x,transform_pose.position.y,transform_pose.position.z));
64 transform = rot * trans;
71 #endif // COB_OMNI_DRIVE_CONTROLLER_PARAM_PARSER_H
bool parseWheelTransform(const std::string &joint_name, const std::string &parent_link_name, tf2::Transform &transform, urdf::Model *model)
#define ROS_ERROR_STREAM(args)