0
$\begingroup$

Rosanswers logo

Update: any reason why I should not open a ticket on this item now.

I have re-tested this under both the compiled source and the lasted upgrade and still tf2 static latch transforms do not show in the tf_frame graph.

Update: a simplified example. I have replaced the body of the question with this example.

Update: I will open a ticket on this if no one has any additional input.

image description

Here is the code and the resulting rviz image. I also did a variation with the addition of a base_link to fixed_frame with the same results.

int main(int argc, char **argv)
{
  ros::init(argc, argv, "robot_odometry");
  tf2_ros::StaticTransformBroadcaster static_broadcaster;

  geometry_msgs::TransformStamped msg2;

  msg2.header.stamp = ros::Time::now();
  msg2.transform.translation.z = 0.1;
  msg2.transform.rotation.w =  1;
  msg2.transform.translation.z = 0.1;
  msg2.transform.translation.y = 0.13; 
  msg2.transform.translation.x = 0.13; 
  msg2.header.frame_id = "base_link";   
  msg2.child_frame_id  = "right";;
  static_broadcaster.sendTransform(msg2);

 
  ros::spin();
  return 0;
}



<?xml version="1.0"?>
<robot name="rrbot">
   <link name='base_link'>
      <visual name='visual'>
        <geometry>
          <box  size=".4 .2 .1"/>
        </geometry>
      </visual>
  </link>


  <link name="right">
    <visual name="visual">
      <origin xyz="0.13 0.13 0.1" />
      <geometry>
        <cylinder  length="0.5" radius="0.5"/>
      </geometry>
    </visual>
  </link>

  <joint type="fixed" name="joint2">
    <origin xyz="0.13 0.13 0.1" />
    <parent link="base_link"/>
    <child link="right"/>
  </joint>

</robot>

Also to note : no matter how many transforms I send weather independently or via vector only the last transform is published. The model was updated to new links in this case.

  std::vector<geometry_msgs::TransformStamped> v1;
  v1.push_back(msg1);
  v1.push_back(msg2);
      .
      .
      .
  static_broadcaster.sendTransform(v1);

Originally posted by rnunziata on ROS Answers with karma: 713 on 2013-10-17

Post score: 0


Original comments

Comment by BennyRe on 2013-10-17:
Did you check this function gets called?

Comment by rnunziata on 2013-10-18:
yes..it is being called.

Comment by BennyRe on 2013-10-18:
Hm can't find an error. Could you provide more code?

Comment by rnunziata on 2013-10-18:
I updated the question with the full code for the node. The routine name is the same.

Comment by tfoote on 2013-10-20:
You should isolate it down to the minimum possible code path before filing a ticket to make sure you know exactly what the problem is.

Comment by rnunziata on 2013-10-21:
I have tried to do as you said....please comment on new example.

Comment by tfoote on 2013-10-21:
Thanks for the update. I still don't see any error. The rviz plugin is reporting successfully transforming both base_link and right frame_ids.

Comment by rnunziata on 2013-10-21:
yes, but that is not the question. The question is why do static transforms not show in the TF tree. If you use the static transform node they do show. So why should they not show if sent programmaticly. Also this is just a single tf. If you publish more then one form the same node as indicate only one is transformed.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Ahh, I think you're running into this issue: https://github.com/ros/geometry_experimental/pull/29 patched last week.


Originally posted by tfoote with karma: 58457 on 2013-10-21

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by rnunziata on 2013-10-21:
Not much info on what was fixed. Looking at my ubuntu software center I have this package installed and I am current. So this issue seems not to be fixed,yes?

Comment by tfoote on 2013-10-21:
It's patched in the source. If you want it immediately you can pull it from source. It will be released into binary packages in the near future.

Comment by rnunziata on 2013-10-22:
Trying to install fix form source....see update question for error...not sure what this error means.

Comment by tfoote on 2013-10-22:
You seem to have a conflicting target name in your rrbot_gazebo. Please open a new question as this is a new issue and we don't want to dilute this question for future searchers with a similar problem.

Comment by rnunziata on 2013-10-24:
I have updated question...have downloaded and test latest code. Problem still present.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.