diff --git a/examples/get_simulation_time.rs b/examples/get_simulation_time.rs index 0d0f639..f903533 100644 --- a/examples/get_simulation_time.rs +++ b/examples/get_simulation_time.rs @@ -13,7 +13,6 @@ fn main() -> Result<(), RemoteAPIError> { ..RemoteApiClientParams::default() })?; - sim.set_stepping(true)?; sim.start_simulation()?; diff --git a/examples/opencv_example/src/main.rs b/examples/opencv_example/src/main.rs index 9235fce..d7010b3 100644 --- a/examples/opencv_example/src/main.rs +++ b/examples/opencv_example/src/main.rs @@ -19,7 +19,6 @@ fn main() -> Result<(), RemoteAPIError> { ..RemoteApiClientParams::default() })?; - let vision_sensor_handle = client.get_object("/VisionSensor".to_string(), None)?; client.set_stepping(true)?; @@ -29,7 +28,8 @@ fn main() -> Result<(), RemoteAPIError> { let start_time = client.get_simulation_time()?; let mut time = start_time; while time - start_time < 5.0 { - let (img, res) = client.get_vision_sensor_img(vision_sensor_handle, None, None, None, None)?; + let (img, res) = + client.get_vision_sensor_img(vision_sensor_handle, None, None, None, None)?; opencv_show_image(img, res); diff --git a/examples/simple_test.rs b/examples/simple_test.rs index 28b3d33..afb16ab 100644 --- a/examples/simple_test.rs +++ b/examples/simple_test.rs @@ -22,7 +22,6 @@ fn main() -> Result<(), RemoteAPIError> { ..RemoteApiClientParams::default() })?; - // When simulation is not running, ZMQ message handling could be a bit // slow, since the idle loop runs at 8 Hz by default. So let's make // sure that the idle loop runs at full speed for this program: @@ -31,7 +30,9 @@ fn main() -> Result<(), RemoteAPIError> { client.set_int32_param(sim::INTPARAM_IDLE_FPS, 0)?; // Create a few dummies and set their positions: - let handles: Vec = (0..50).map(|_| client.create_dummy(0.01).unwrap()).collect(); + let handles: Vec = (0..50) + .map(|_| client.create_dummy(0.01).unwrap()) + .collect(); for (i, h) in handles.iter().enumerate() { let i = i as f64; diff --git a/examples/synchronous_image_transmission.rs b/examples/synchronous_image_transmission.rs index 721abea..58be584 100644 --- a/examples/synchronous_image_transmission.rs +++ b/examples/synchronous_image_transmission.rs @@ -19,10 +19,10 @@ fn main() -> Result<(), RemoteAPIError> { ..RemoteApiClientParams::default() })?; - let vision_sensor_handle = client.get_object("/VisionSensor".to_string(), None)?; - let passive_vision_sensor_handle = client.get_object("/PassiveVisionSensor".to_string(), None)?; + let passive_vision_sensor_handle = + client.get_object("/PassiveVisionSensor".to_string(), None)?; client.set_stepping(true)?; diff --git a/src/remote_api_client/client.rs b/src/remote_api_client/client.rs index ea954b5..9ae9b2d 100644 --- a/src/remote_api_client/client.rs +++ b/src/remote_api_client/client.rs @@ -182,9 +182,8 @@ impl RemoteApiClientInterface for &RemoteApiClient { } } -impl Sim for RemoteApiClient{} -impl Sim for &RemoteApiClient{} - -impl SimIk for RemoteApiClient{} -impl SimIk for &RemoteApiClient{} +impl Sim for RemoteApiClient {} +impl Sim for &RemoteApiClient {} +impl SimIk for RemoteApiClient {} +impl SimIk for &RemoteApiClient {} diff --git a/src/remote_api_objects/sim/sim_api.rs b/src/remote_api_objects/sim/sim_api.rs index 620cee9..c46d666 100644 --- a/src/remote_api_objects/sim/sim_api.rs +++ b/src/remote_api_objects/sim/sim_api.rs @@ -3,4 +3,3 @@ use crate::remote_api_client::RemoteApiClientInterface; use crate::zmq_requests::RawRequest; include!("../../../c_transpiler/assets/sim.rs"); - diff --git a/src/remote_api_objects/sim/tests.rs b/src/remote_api_objects/sim/tests.rs index 77c52b7..2abd139 100644 --- a/src/remote_api_objects/sim/tests.rs +++ b/src/remote_api_objects/sim/tests.rs @@ -17,7 +17,6 @@ fn test_get_simulation_time_functions() -> Result<(), RemoteAPIError> { result: RefCell::new(json!({"ret":[1],"success":true})), }; - sim.start_simulation()?; let payload = log_utils::to_byte_array_string(&sim.get_payload()); println!("{payload}");