.. _PilotServer: PilotServer =========== .. cpp:namespace:: pilot::PilotServer Module ------ The `PilotServer` module is the control center of the robot, it handles switching between different modes such as mapping and navigation or automatic drive mode and teleoperation. In addition it allows to initialize the localization as well as start / stop a data recording. Most functions require a special permission, see :ref:`pilot.permission_e`. Functions --------- .. cpp:function:: PilotState get_state() const Returns the current pilot state, see :ref:`pilot.PilotState`. .. cpp:function:: PlatformInfo get_platform_info() const Returns platform info, see :ref:`pilot.PlatformInfo`. .. cpp:function:: void set_pose_estimate(Vector3d pose, long time) Initializes the localization by providing a ``pose`` estimate (x, y, yaw) [m, m, rad] in map coordinates. Optionally a ``time`` stamp can be provided in [usec]. See :ref:`math.Vector3d`. Requires permission ``INITIALIZE``. .. cpp:function:: void switch_pilot_mode(pilot_mode_e new_mode, Object config, bool keep_motion_mode = false) Switches the current pilot mode to ``new_mode``. Platform has to be stationary. Optionally a user config can be provided with ``config``, overriding default values. If ``keep_motion_mode`` is set to true, the current motion mode will not be changed automatically. See :ref:`pilot.pilot_mode_e` and :ref:`vnx.Object`. Requires permission ``REMOTE_CONTROL``. .. cpp:function:: void switch_motion_mode(motion_mode_e new_mode) Switches the current motion mode to ``new_mode``. Platform has to be stationary. See :ref:`pilot.motion_mode_e`. Requires permission ``REMOTE_CONTROL``. .. cpp:function:: void switch_footprint(Footprint footprint) Sets a new footprint to use. Platform has to be stationary. See :ref:`pilot.Footprint`. Requires permission ``REMOTE_CONTROL``. .. cpp:function:: void start_recording(string file_name) Starts a new data recording using the optional file name ``file_name``. The recording will end up in the ``~/pilot/user/data/`` folder. If ``file_name`` is empty a default name will be chosen. In any case a timestamp will be appended to the file name to make it unique. Requires permission ``RECORD_DATA``. .. cpp:function:: void stop_recording() Stops the current data recording process. Requires permission ``RECORD_DATA``.