ticare_navigation.pose_recorder module

class ticare_navigation.pose_recorder.PoseRecorder(*args: Any, **kwargs: Any)

Bases: Node

Node responsible for receiving poses and storing them in YAML format.

Attributes:

current_pose (PoseWithCovarianceStamped): The latest pose received from the /amcl_pose topic. srv (Service): Receives a label and saves the current pose. subscription (Subscription): Catches the current pose for immediate saving. data_dir (str): The directory path where the YAML files will be saved. covariance (float): The average covariance calculated from the pose’s covariance matrix. data_to_save (PoseStamped): The pose data formatted for saving to a YAML file.

pose_callback(msg: geometry_msgs.msg.PoseWithCovarianceStamped) None

Callback function that updates the current pose and covariance based on incoming messages from the /amcl_pose topic.

Args:
msg (PoseWithCovarianceStamped): The message received from the /amcl_pose topic,

containing the robot’s current pose and covariance information.

save_pose_callback(request: ticare_interfaces.srv.SavePose.Request, response: ticare_interfaces.srv.SavePose.Response) ticare_interfaces.srv.SavePose.Response

Callback function that handles incoming service requests to save the current pose to a YAML file.

Args:
request (SavePose.Request): The service request containing the label for the pose

to be saved.

response (SavePose.Response): The service response indicating the success or failure

of the save operation.

Returns:

SavePose.Response: The response object containing the result of the save operation.

ticare_navigation.pose_recorder.main(args=None) None

Main function that initializes the ROS node and starts spinning to process incoming messages and service requests.