Skip to content

Commit 2e9d4ff

Browse files
committed
use ros::Time(0) for lookupTransform
1 parent f79b70b commit 2e9d4ff

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/frame_publisher.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,10 @@ bool FramePublisher::initialize()
7575
/// Broadcast a new frame based on a given transformation from_frame -> to_frame - resetting either translation and/or individual rotation axes to zero
7676
void FramePublisher::frameBroadcastCallback(const ros::TimerEvent& event)
7777
{
78-
ros::Time time = event.current_real;
7978
geometry_msgs::TransformStamped transform_msg;
8079
try
8180
{
82-
transform_msg = tf_buffer_.lookupTransform(from_frame_, to_frame_, time, ros::Duration(0.1));
81+
transform_msg = tf_buffer_.lookupTransform(from_frame_, to_frame_, ros::Time(0), ros::Duration(0.1));
8382
ROS_DEBUG_STREAM("FramePublisher::frameBroadcastCallback: transform_msg:\n" << transform_msg);
8483
}
8584
catch (tf2::TransformException& ex)

0 commit comments

Comments
 (0)