|
@ -65,7 +65,6 @@ class LocateArUcoTag(hm.HelloNode): |
|
|
# Define the head actuation rotational velocity |
|
|
# Define the head actuation rotational velocity |
|
|
self.rot_vel = 0.5 # radians per sec |
|
|
self.rot_vel = 0.5 # radians per sec |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def joint_states_callback(self, msg): |
|
|
def joint_states_callback(self, msg): |
|
|
""" |
|
|
""" |
|
|
A callback function that stores Stretch's joint states. |
|
|
A callback function that stores Stretch's joint states. |
|
@ -74,7 +73,6 @@ class LocateArUcoTag(hm.HelloNode): |
|
|
""" |
|
|
""" |
|
|
self.joint_state = msg |
|
|
self.joint_state = msg |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def send_command(self, command): |
|
|
def send_command(self, command): |
|
|
''' |
|
|
''' |
|
|
Handles single joint control commands by constructing a FollowJointTrajectoryGoal |
|
|
Handles single joint control commands by constructing a FollowJointTrajectoryGoal |
|
@ -125,7 +123,6 @@ class LocateArUcoTag(hm.HelloNode): |
|
|
self.trajectory_client.send_goal(trajectory_goal) |
|
|
self.trajectory_client.send_goal(trajectory_goal) |
|
|
self.trajectory_client.wait_for_result() |
|
|
self.trajectory_client.wait_for_result() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def find_tag(self, tag_name='docking_station'): |
|
|
def find_tag(self, tag_name='docking_station'): |
|
|
""" |
|
|
""" |
|
|
A function that actuates the camera to search for a defined ArUco tag |
|
|
A function that actuates the camera to search for a defined ArUco tag |
|
@ -177,7 +174,6 @@ class LocateArUcoTag(hm.HelloNode): |
|
|
# Notify that the requested tag was not found |
|
|
# Notify that the requested tag was not found |
|
|
rospy.loginfo("The requested tag '%s' was not found", tag_name) |
|
|
rospy.loginfo("The requested tag '%s' was not found", tag_name) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def main(self): |
|
|
def main(self): |
|
|
""" |
|
|
""" |
|
|
Function that initiates the issue_command function. |
|
|
Function that initiates the issue_command function. |
|
@ -203,7 +199,6 @@ class LocateArUcoTag(hm.HelloNode): |
|
|
# Search for the ArUco marker for the docking station |
|
|
# Search for the ArUco marker for the docking station |
|
|
pose = self.find_tag("docking_station") |
|
|
pose = self.find_tag("docking_station") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__': |
|
|
if __name__ == '__main__': |
|
|
# Use a try-except block |
|
|
# Use a try-except block |
|
|
try: |
|
|
try: |
|
|