# TrajectoryStates.msg ## Overview `TrajectoryStates.msg` reports the state of each trajectory known to Cartographer. It maps trajectory IDs to their current state via parallel arrays. ## Constants | Constant | Value | Meaning | | --- | --- | --- | | `ACTIVE` | `0` | The trajectory is actively being mapped. | | `FINISHED` | `1` | The trajectory has finished mapping. | | `FROZEN` | `2` | The trajectory is frozen and no longer being optimized. | | `DELETED` | `3` | The trajectory has been deleted. | ## Fields | Field | Type | Description | | --- | --- | --- | | `header` | `std_msgs/Header` | The standard ROS header. | | `trajectory_id` | `int32[]` | The list of trajectory IDs. | | `trajectory_state` | `uint8[]` | The state of each trajectory, parallel to `trajectory_id` and using the constants above. | ## Usage - The arrays are parallel: `trajectory_state[i]` corresponds to `trajectory_id[i]`. - This message is returned by `GetTrajectoryStates.srv`. - Consumers can use the state to decide whether a trajectory is ready for finalization or can be reused.