pub struct FSDSClient { /* private fields */ }Implementations§
Source§impl FSDSClient
impl FSDSClient
pub async fn init( addr: Option<&str>, _timeout_value: Option<u64>, ) -> Result<Self>
Sourcepub async fn reset(&mut self) -> Result<Value, Error>
pub async fn reset(&mut self) -> Result<Value, Error>
Reset the vehicle to its original starting state.
Note that you must call enable_api_control again after the call to
reset.
Sourcepub async fn ping(&mut self) -> Result<Value, Error>
pub async fn ping(&mut self) -> Result<Value, Error>
If connection is established then this call will return Ok(_) otherwise it will be blocked until timeout.
Sourcepub async fn enable_api_control(
&mut self,
vehicle_name: &str,
) -> Result<Value, Error>
pub async fn enable_api_control( &mut self, vehicle_name: &str, ) -> Result<Value, Error>
Enables API control for vehicle corresponding to vehicle_name.
Sourcepub async fn disable_api_control(
&mut self,
vehicle_name: &str,
) -> Result<Value, Error>
pub async fn disable_api_control( &mut self, vehicle_name: &str, ) -> Result<Value, Error>
Disable API control for vehicle corresponding to vehicle_name.
Sourcepub async fn is_api_control_enabled(
&mut self,
vehicle_name: &str,
) -> Result<Value, Error>
pub async fn is_api_control_enabled( &mut self, vehicle_name: &str, ) -> Result<Value, Error>
Returns true if API control is established.
If false (which is default) then API calls would be ignored. After a
successful call to enableApiControl, isApiControlEnabled should
return true.
Sourcepub async fn sim_get_image(
&mut self,
camera_name: &str,
image_type: ImageType,
vehicle_name: &str,
) -> Result<Value, Error>
pub async fn sim_get_image( &mut self, camera_name: &str, image_type: ImageType, vehicle_name: &str, ) -> Result<Value, Error>
Get a single image.
Returns bytes of png format image which can be dumped into a binary file to create .png image.
See https://microsoft.github.io/AirSim/image_apis/ for details.
Sourcepub async fn sim_get_images(
&mut self,
requests: &[ImageRequest],
vehicle_name: &str,
) -> Result<Value, Error>
pub async fn sim_get_images( &mut self, requests: &[ImageRequest], vehicle_name: &str, ) -> Result<Value, Error>
Get multiple images.
See https://microsoft.github.io/AirSim/image_apis/ for details and examples.
Sourcepub async fn sim_get_ground_truth_kinematics(
&mut self,
vehicle_name: &str,
) -> Result<Value, Error>
pub async fn sim_get_ground_truth_kinematics( &mut self, vehicle_name: &str, ) -> Result<Value, Error>
Get Ground truth kinematics of the vehicle.