18 #ifndef COB_TRICYCLE_CONTROLLER_PARAM_PARSER_H 19 #define COB_TRICYCLE_CONTROLLER_PARAM_PARSER_H 33 urdf::JointConstSharedPtr joint(model->getJoint(joint_name));
37 <<
" couldn't be retrieved from model description");
42 joint->parent_to_joint_origin_transform.rotation.y,
43 joint->parent_to_joint_origin_transform.rotation.z,
44 joint->parent_to_joint_origin_transform.rotation.w),
45 tf2::Vector3(joint->parent_to_joint_origin_transform.position.x,
46 joint->parent_to_joint_origin_transform.position.y,
47 joint->parent_to_joint_origin_transform.position.z));
52 while(joint->parent_link_name != parent_link_name)
54 urdf::LinkConstSharedPtr link_parent(model->getLink(joint->parent_link_name));
55 ROS_DEBUG_STREAM(
"joint: "<<joint->name<<
", parent_link_name: "<<joint->parent_link_name);
56 if (!link_parent || !link_parent->parent_joint)
59 <<
" couldn't be retrieved from model description or his parent joint");
62 joint = link_parent->parent_joint;
64 joint->parent_to_joint_origin_transform.rotation.y,
65 joint->parent_to_joint_origin_transform.rotation.z,
66 joint->parent_to_joint_origin_transform.rotation.w),
67 tf2::Vector3(joint->parent_to_joint_origin_transform.position.x,
68 joint->parent_to_joint_origin_transform.position.y,
69 joint->parent_to_joint_origin_transform.position.z));
70 transform_inc *= transform;
71 ROS_DEBUG_STREAM(
"transform");
75 ROS_DEBUG_STREAM(
"transform_inc");
76 ROS_DEBUG_STREAM(
"Tx: "<<transform_inc.
getOrigin().x()<<
", Ty: "<<transform_inc.
getOrigin().y()<<
", Tz: "<<transform_inc.
getOrigin().z());
82 transform = transform_inc;
93 #endif // COB_TRICYCLE_CONTROLLER_PARAM_PARSER_H
tf2Scalar getAngle() const
bool parseWheelTransform(const std::string &joint_name, const std::string &parent_link_name, tf2::Transform &transform, urdf::Model *model)
#define ROS_DEBUG_STREAM(args)
#define ROS_ERROR_STREAM(args)