Browse Source

Init commit.

main
Alan G. Sanchez 2 years ago
parent
commit
8bd12a20fd
1 changed files with 7 additions and 7 deletions
  1. +7
    -7
      src/aruco_tag_locator.py

src/docking_station_locator.py → src/aruco_tag_locator.py View File

@ -25,10 +25,10 @@ from trajectory_msgs.msg import JointTrajectoryPoint
# Import TransformStamped from the geometry_msgs package for the publisher
from geometry_msgs.msg import TransformStamped
class LocateDockingTag(hm.HelloNode):
class LocateArUcoTag(hm.HelloNode):
"""
A class that actuates the RealSense camera to find the docking station using
an ArUco tag.
A class that actuates the RealSense camera to find the docking station's
ArUco tag and returns a Transform between the `base_link` and the requested tag.
"""
def __init__(self):
"""
@ -168,7 +168,7 @@ class LocateDockingTag(hm.HelloNode):
self.send_command(tilt_command)
rospy.sleep(.25)
# 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)
def main(self):
@ -178,7 +178,7 @@ class LocateDockingTag(hm.HelloNode):
"""
# The arguments of the main function of the hm.HelloNode class are the
# node_name, node topic namespace, and boolean (default value is true)
hm.HelloNode.main(self, 'docking_station_locator', 'docking_station_locator', wait_for_first_pointcloud=False)
hm.HelloNode.main(self, 'aruco_tag_locator', 'aruco_tag_locator', wait_for_first_pointcloud=False)
# Create a StaticTranformBoradcaster Node. Also, start a Tf buffer that
# will store the tf information for a few seconds.Then set up a tf listener, which
@ -200,8 +200,8 @@ class LocateDockingTag(hm.HelloNode):
if __name__ == '__main__':
# Use a try-except block
try:
# Instantiate the `LocateDockingTag()` object
node = LocateDockingTag()
# Instantiate the `LocateArUcoTag()` object
node = LocateArUcoTag()
# Run the `main()` method.
node.main()
except KeyboardInterrupt:

Loading…
Cancel
Save