# StartTrajectory.srv ## Overview `StartTrajectory.srv` requests that a new trajectory be started on the Cartographer node using a specified configuration file. It optionally supports starting at a given initial pose relative to an existing trajectory. ## Request | Field | Type | Description | | --- | --- | --- | | `configuration_directory` | `string` | The directory containing the Cartographer configuration files. | | `configuration_basename` | `string` | The basename of the configuration file to use (e.g., `backpack_2d.lua`). | | `use_initial_pose` | `bool` | Whether to use `initial_pose` as the starting pose. | | `initial_pose` | `geometry_msgs/Pose` | The initial pose to start from, used when `use_initial_pose` is true. | | `relative_to_trajectory_id` | `int32` | The ID of a trajectory to which `initial_pose` is relative; `-1` means absolute in the map frame. | ## Response | Field | Type | Description | | --- | --- | --- | | `status` | `cartographer_ros_msgs/StatusResponse` | The outcome of the request; check `code` against `StatusCode.OK`. | | `trajectory_id` | `int32` | The ID assigned to the newly started trajectory. | ## Usage - The returned `trajectory_id` is used later to query, finish, or reference the trajectory. - When `use_initial_pose` is false, `initial_pose` and `relative_to_trajectory_id` are ignored.