Extract tf::Transform from tf::StampedTransform & tf::Stamped<tf::Transform>
I'm trying to find a cascaded transform but I'm running into the following errors :
tf::TransformListener listener;
tf::StampedTransform transform_cd;
try
{
for(unsigned int i=0; i<tag_detection_array.detections.size(); i++) {
geometry_msgs::PoseStamped pose;
pose.pose = tag_detection_array.detections[i].pose.pose.pose;
pose.header = tag_detection_array.detections[i].pose.header;
tf::Stamped<tf::Transform> tag_transform, transform_td, transform_tc;
tf::poseStampedMsgToTF(pose, tag_transform);
listener.lookupTransform("camera", "drone", tag_transform.stamp_, transform_cd);
transform_tc = tag_transform.inverse();
transform_td = transform_tc*transform_cd;
tf::Matrix3x3(transform_td.getRotation()).getRPY(uavRollENU, uavPitchENU, uavYawENU);
if(pose.pose.position.z>0.1 && fabs(uavPitchENU) < 30/57.2958 && fabs(uavRollENU) < 30/57.2958)
{
tf_pub_.sendTransform(tf::StampedTransform(tag_transform,
tag_transform.stamp_,
camera_tf_frame_,
detection_names[i]));
tf::poseStampedTFToMsg(transform_td, pose);
error: no match for ‘operator=’ (operand types are ‘tf::Stamped<tf::Transform>’ and ‘tf::Transform’)
transform_tc = tag_transform.inverse();
error: no match for ‘operator=’ (operand types are ‘tf::Stamped<tf::Transform>’ and ‘tf::Transform’)
transform_td = transform_tc*transform_cd;
This is what I'm attempting to do transform_tc = tag_transform.inverse();
transform_td = transform_tc*transform_cd;