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 pilot.permission_e.
Functions¶
-
PilotState
get_state
() const¶ Returns the current pilot state, see pilot.PilotState.
-
PlatformInfo
get_platform_info
() const¶ Returns platform info, see pilot.PlatformInfo.
-
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 atime
stamp can be provided in [usec]. See math.Vector3d. Requires permissionINITIALIZE
.
-
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 withconfig
, overriding default values. Ifkeep_motion_mode
is set to true, the current motion mode will not be changed automatically. See pilot.pilot_mode_e and vnx.Object. Requires permissionREMOTE_CONTROL
.
-
void
switch_motion_mode
(motion_mode_e new_mode)¶ Switches the current motion mode to
new_mode
. Platform has to be stationary. See pilot.motion_mode_e. Requires permissionREMOTE_CONTROL
.
-
void
switch_footprint
(Footprint footprint)¶ Sets a new footprint to use. Platform has to be stationary. See pilot.Footprint. Requires permission
REMOTE_CONTROL
.
-
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. Iffile_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 permissionRECORD_DATA
.
-
void
stop_recording
()¶ Stops the current data recording process. Requires permission
RECORD_DATA
.