Open GitNzino opened 2 years ago
In my script I am using tf2_ros, so I had some issue on time tolerance of tf because tf2_ros not publish the tf with a certain frequency as tf does.
For me worked this type of modification from line 78 to 92 of follow_waypoints.py
.
self.client.send_goal(goal)
if self.distance_tolerance <= 0.0:
self.client.wait_for_result()
rospy.loginfo("Waiting for %f sec..." % self.duration)
time.sleep(self.duration)
else:
#This is the loop which exist when the robot is near a certain GOAL point.
distance = 10
while(distance > self.distance_tolerance):
now = rospy.Time(0)
self.listener.waitForTransform(self.frame_id, self.base_frame_id, now, rospy.Duration(4.0))
trans,rot = self.listener.lookupTransform(self.frame_id,self.base_frame_id, now)
distance = math.sqrt(pow(waypoint.pose.pose.position.x-trans[0],2)+pow(waypoint.pose.pose.position.y-trans[1],2))
# rospy.loginfo(distance)
return 'success'
Hi I want to congrats you for the excellent work done, all the package works amazing!
I only have issue on waypoints tolerance because I don't want that the robot stops at each waypoints and also changing the value of tolerance the robot stops the same.
Can You help me in found some solution? I would be grateful, Lorenzo