43 check_frequency_(check_frequency),
44 timeout_padding_(timeout_padding)
52 tf2_msgs::LookupTransformGoal goal;
53 goal.target_frame = target_frame;
54 goal.source_frame = source_frame;
55 goal.source_time = time;
56 goal.timeout = timeout;
57 goal.advanced =
false;
63 const std::string& source_frame,
const ros::Time& source_time,
64 const std::string& fixed_frame,
const ros::Duration timeout)
const 67 tf2_msgs::LookupTransformGoal goal;
68 goal.target_frame = target_frame;
69 goal.source_frame = source_frame;
70 goal.source_time = source_time;
71 goal.timeout = timeout;
72 goal.target_time = target_time;
73 goal.fixed_frame = fixed_frame;
88 throw tf2::TimeoutException(
"The LookupTransform goal sent to the BufferServer did not come back in the specified time. Something is likely wrong with the server.");
92 throw tf2::TimeoutException(
"The LookupTransform goal sent to the BufferServer did not come back with SUCCEEDED status. Something is likely wrong with the server.");
101 if(result.error.error != result.error.NO_ERROR){
103 if(result.error.error == result.error.LOOKUP_ERROR)
106 if(result.error.error == result.error.CONNECTIVITY_ERROR)
109 if(result.error.error == result.error.EXTRAPOLATION_ERROR)
112 if(result.error.error == result.error.INVALID_ARGUMENT_ERROR)
115 if(result.error.error == result.error.TIMEOUT_ERROR)
121 return result.transform;
144 const std::string& source_frame,
const ros::Time& source_time,
145 const std::string& fixed_frame,
const ros::Duration timeout, std::string* errstr)
const 149 lookupTransform(target_frame, target_time, source_frame, source_time, fixed_frame, timeout);
ResultConstPtr getResult() const
geometry_msgs::TransformStamped processResult(const tf2_msgs::LookupTransformResult &result) const
bool waitForResult(const ros::Duration &timeout=ros::Duration(0, 0))
virtual bool canTransform(const std::string &target_frame, const std::string &source_frame, const ros::Time &time, const ros::Duration timeout=ros::Duration(0.0), std::string *errstr=NULL) const
Test if a transform is possible.
SimpleClientGoalState getState() const
ros::Duration timeout_padding_
LookupActionClient client_
geometry_msgs::TransformStamped processGoal(const tf2_msgs::LookupTransformGoal &goal) const
virtual geometry_msgs::TransformStamped lookupTransform(const std::string &target_frame, const std::string &source_frame, const ros::Time &time, const ros::Duration timeout=ros::Duration(0.0)) const
Get the transform between two frames by frame ID.
void sendGoal(const Goal &goal, SimpleDoneCallback done_cb=SimpleDoneCallback(), SimpleActiveCallback active_cb=SimpleActiveCallback(), SimpleFeedbackCallback feedback_cb=SimpleFeedbackCallback())
BufferClient(std::string ns, double check_frequency=10.0, ros::Duration timeout_padding=ros::Duration(2.0))
BufferClient constructor.