diff --git a/example_11.md b/example_11.md index 527c75f..a35d832 100644 --- a/example_11.md +++ b/example_11.md @@ -93,7 +93,7 @@ class PointCloudTransformer: :param self: The self reference. :param msg: The PointCloud message. - :returns new_cloud: PointCloud message. + :returns new_cloud: The transformed PointCloud message. """ while not rospy.is_shutdown(): try: diff --git a/example_12.md b/example_12.md index 53d63ae..64ae220 100644 --- a/example_12.md +++ b/example_12.md @@ -148,7 +148,7 @@ class LocateArUcoTag(hm.HelloNode): :param self: The self reference. :param tag_name: A string value of the ArUco marker name. - :returns transform: A TransformStamped message type. + :returns transform: The docking station's TransformStamped message. """ pan_command = {'joint': 'joint_head_pan', 'position': self.min_pan_position} self.send_command(pan_command) @@ -325,7 +325,7 @@ def find_tag(self, tag_name='docking_station'): :param self: The self reference. :param tag_name: A string value of the ArUco marker name. - :returns transform: A TransformStamped message type. + :returns transform: The docking station's TransformStamped message. """ pan_command = {'joint': 'joint_head_pan', 'position': self.min_pan_position} self.send_command(pan_command) diff --git a/example_9.md b/example_9.md index 76d930b..2946a17 100644 --- a/example_9.md +++ b/example_9.md @@ -98,16 +98,17 @@ class GetVoiceCommands: def callback_direction(self, msg): """ - A callback function that converts the sound direction from degrees to radians. + A callback function that converts the incoming message, sound direction, + from degrees to radians. :param self: The self reference. - :param msg: The Int32 message type. + :param msg: The Int32 message type that represents the sound direction. """ self.sound_direction = msg.data * -self.rad_per_deg def callback_speech(self,msg): """ - A callback function that takes all items in the iterable list and join - them into a single string. + A callback function takes the incoming message, a list of the speech to + text, and joins all items in that iterable list into a single string. :param self: The self reference. :param msg: The SpeechRecognitionCandidates message type. """ @@ -119,7 +120,7 @@ class GetVoiceCommands: base motion. :param self:The self reference. - :returns inc: A dictionary type. + :returns inc: A dictionary type the contains the increment size. """ if self.step_size == 'small': inc = {'rad': self.small_rad, 'translate': self.small_translate} @@ -159,7 +160,7 @@ class GetVoiceCommands: A function that defines the teleoperation command based on the voice command. :param self: The self reference. - :returns command: A dictionary type. + :returns command: A dictionary type that contains the type of base motion. """ command = None if self.voice_command == 'forward': @@ -192,6 +193,7 @@ class VoiceTeleopNode(hm.HelloNode): """ A function that declares object from the GetVoiceCommands class, instantiates the HelloNode class, and set the publishing rate. + :param self: The self reference. """ hm.HelloNode.__init__(self) self.rate = 10.0 @@ -370,6 +372,7 @@ class VoiceTeleopNode(hm.HelloNode): """ A function that declares object from the GetVoiceCommands class, instantiates the HelloNode class, and set the publishing rate. + :param self: The self reference. """ hm.HelloNode.__init__(self) self.rate = 10.0 diff --git a/src/aruco_tag_locator.py b/src/aruco_tag_locator.py index 642cbd4..307c49b 100644 --- a/src/aruco_tag_locator.py +++ b/src/aruco_tag_locator.py @@ -65,7 +65,6 @@ class LocateArUcoTag(hm.HelloNode): # Define the head actuation rotational velocity self.rot_vel = 0.5 # radians per sec - def joint_states_callback(self, msg): """ A callback function that stores Stretch's joint states. @@ -74,7 +73,6 @@ class LocateArUcoTag(hm.HelloNode): """ self.joint_state = msg - def send_command(self, command): ''' 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.wait_for_result() - def find_tag(self, tag_name='docking_station'): """ A function that actuates the camera to search for a defined ArUco tag @@ -133,7 +130,7 @@ class LocateArUcoTag(hm.HelloNode): :param self: The self reference. :param tag_name: A string value of the ArUco marker name. - :returns transform: A TransformStamped message type. + :returns transform: The docking station's TransformStamped message. """ # Create dictionaries to get the head in its initial position pan_command = {'joint': 'joint_head_pan', 'position': self.min_pan_position} @@ -177,7 +174,6 @@ class LocateArUcoTag(hm.HelloNode): # Notify that the requested tag was not found rospy.loginfo("The requested tag '%s' was not found", tag_name) - def main(self): """ Function that initiates the issue_command function. @@ -203,7 +199,6 @@ class LocateArUcoTag(hm.HelloNode): # Search for the ArUco marker for the docking station pose = self.find_tag("docking_station") - if __name__ == '__main__': # Use a try-except block try: diff --git a/src/pointcloud_transformer.py b/src/pointcloud_transformer.py index bf1e2a8..9c3d90d 100755 --- a/src/pointcloud_transformer.py +++ b/src/pointcloud_transformer.py @@ -74,7 +74,7 @@ class PointCloudTransformer: :param self: The self reference. :param msg: The PointCloud message. - :returns new_cloud: PointCloud message. + :returns new_cloud: The transformed PointCloud message. """ while not rospy.is_shutdown(): try: diff --git a/src/voice_teleoperation_base.py b/src/voice_teleoperation_base.py index 1262dbc..fb5bf0d 100755 --- a/src/voice_teleoperation_base.py +++ b/src/voice_teleoperation_base.py @@ -69,16 +69,17 @@ class GetVoiceCommands: def callback_direction(self, msg): """ - A callback function that converts the sound direction from degrees to radians. + A callback function that converts the incoming message, sound direction, + from degrees to radians. :param self: The self reference. - :param msg: The Int32 message type. + :param msg: The Int32 message type that represents the sound direction. """ self.sound_direction = msg.data * -self.rad_per_deg def callback_speech(self,msg): """ - A callback function that takes all items in the iterable list and join - them into a single string. + A callback function takes the incoming message, a list of the speech to + text, and joins all items in that iterable list into a single string. :param self: The self reference. :param msg: The SpeechRecognitionCandidates message type. """ @@ -90,7 +91,7 @@ class GetVoiceCommands: base motion. :param self:The self reference. - :returns inc: A dictionary type. + :returns inc: A dictionary type the contains the increment size. """ if self.step_size == 'small': inc = {'rad': self.small_rad, 'translate': self.small_translate} @@ -130,7 +131,7 @@ class GetVoiceCommands: A function that defines the teleoperation command based on the voice command. :param self: The self reference. - :returns command: A dictionary type. + :returns command: A dictionary type that contains the type of base motion. """ command = None # Move base forward command @@ -181,6 +182,7 @@ class VoiceTeleopNode(hm.HelloNode): """ A function that declares object from the GetVoiceCommands class, instantiates the HelloNode class, and set the publishing rate. + :param self: The self reference. """ hm.HelloNode.__init__(self) self.rate = 10.0 @@ -200,7 +202,7 @@ class VoiceTeleopNode(hm.HelloNode): """ Function that makes an action call and sends base joint trajectory goals. :param self: The self reference. - :param command: A dictionary type. + :param command: A dictionary that contains the base motion type and increment size. """ joint_state = self.joint_state # Conditional statement to send joint trajectory goals