Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 047f8ffe authored by AUTERNAUD Alex's avatar AUTERNAUD Alex
Browse files

useless attributes

parent 36e18c3d
No related branches found
No related tags found
No related merge requests found
......@@ -48,30 +48,17 @@ class GlobalPathPlannerNode:
threshold_distance_orientation=self.controller_config.orientation_distance_threshold,
threshold_distance_arrival=self.controller_config.waypoint_distance)
self.compute_waypoint_only_once = True
self.waypoint_list = None
self.waypoint_list_cursor = 0
self.joint_states_data = None
self.global_map_data = None
self.local_map_data = None
self.rtabmap_ready = False
self.global_map_static = None
self.go_to_position_target = None
self.go_to_done = False
# To get indexes of the joints
self.get_indexes = False
self.base_goal = False
self.goal_position = [5, 1]
self.wrong_target = False
self.x_wp = 0.
self.y_wp = 0.
self.x_final = 0.
self.y_final = 0.
self.th_final = 0.
self.yaw_final = 0.
self.yaw_wp = 0.
self.flag_waypoint_okay = False
......@@ -81,26 +68,10 @@ class GlobalPathPlannerNode:
self.robot_yaw = 0.
self.robot_position = [0, 0]
self.robot_position_former = [0, 0]
self.former_robot_position = None
self.former_yaw = None
self.former_local_map = None
self.timer_local_map_change = 0
self.former_local_map_step_function = None
self.timer_local_map_change_step_function = 0
self.lock_data_entrance = Lock()
# continuous flags
self.is_continuous_go_to = False
self.continuous_go_to_done = False
self.robot_config = None
self.controller_status_msg = None
self.timestamp_tracking= None
self.timestamp_tracking_latest = None
self.lock_data_entrance = Lock()
self.init_ros_subscriber_and_publicher()
self.tf_broadcaster = tf.TransformBroadcaster() # Publish Transform to look for human
self.tf_listener = tf.TransformListener() # Listen Transform to look for human
......@@ -195,7 +166,7 @@ class GlobalPathPlannerNode:
current_time = rospy.Time.now()
# to debug
quat_final = tf.transformations.quaternion_from_euler(0, 0, self.th_final)
quat_final = tf.transformations.quaternion_from_euler(0, 0, self.yaw_final)
self.x_final, self.y_final = self.goal_position
self.tf_broadcaster.sendTransform(
(self.x_final, self.y_final, 0),
......@@ -218,15 +189,15 @@ class GlobalPathPlannerNode:
def get_robot_pose(self):
r""" Function that compute the position of the robot on the map """
# try:
# map_2_robot = self.tf_listener.lookupTransform(self.map_frame, self.robot_frame, self.timestamp_tracking_latest)
# except:
try:
map_2_robot = self.tf_listener.lookupTransform(self.map_frame, self.robot_frame, self.timestamp_tracking_latest)
map_2_robot = self.tf_listener.lookupTransform(self.map_frame, self.robot_frame, rospy.Time(0))
#rospy.logwarn("Could not get transformation between {} and {} at correct time. Using latest available.".format(self.map_frame, self.robot_frame))
except:
try:
map_2_robot = self.tf_listener.lookupTransform(self.map_frame, self.robot_frame, rospy.Time(0))
#rospy.logwarn("Could not get transformation between {} and {} at correct time. Using latest available.".format(self.map_frame, self.robot_frame))
except:
#rospy.logerr("Could not get transformation between {} and {}.".format(self.map_frame, self.robot_frame))
return None
#rospy.logerr("Could not get transformation between {} and {}.".format(self.map_frame, self.robot_frame))
return None
self.robot_x_position, self.robot_y_position, _ = map_2_robot[0]
(_, _, yaw) = tf.transformations.euler_from_quaternion([map_2_robot[1][0],
map_2_robot[1][1],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment