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.
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.