Trait franka_interface::experiment::SimulationSetup
source · [−]pub trait SimulationSetup {
fn set_franka_urdf_path(&self) -> PathBuf;
fn set_simulation_time_step(&self) -> Duration { ... }
fn setup_simulation(&mut self, _client: Rc<RefCell<PhysicsClient>>) { ... }
fn setup_camera(&mut self, _client: Rc<RefCell<PhysicsClient>>) { ... }
fn get_camera_image(
&mut self,
_client: Rc<RefCell<PhysicsClient>>
) -> RgbaImage { ... }
}
Expand description
A trait which contains methods for handling the simulation. Apart from
set_franka_urdf_path
,
all methods have a default implementation,
so you do not have to implement them if you do not need them.
Required Methods
sourcefn set_franka_urdf_path(&self) -> PathBuf
fn set_franka_urdf_path(&self) -> PathBuf
Return the path to the URDF file of the Franka robot.
Provided Methods
sourcefn set_simulation_time_step(&self) -> Duration
fn set_simulation_time_step(&self) -> Duration
Sets how often the simulation should be updated inside the control loop. The default is 1/240s = 240 Hz
sourcefn setup_simulation(&mut self, _client: Rc<RefCell<PhysicsClient>>)
fn setup_simulation(&mut self, _client: Rc<RefCell<PhysicsClient>>)
this method runs directly after the simulation is spawned. Use this method for example to load additional object into the simulation.
sourcefn setup_camera(&mut self, _client: Rc<RefCell<PhysicsClient>>)
fn setup_camera(&mut self, _client: Rc<RefCell<PhysicsClient>>)
this method is intended to let you setup the camera. It is run directly after setup_simulation.
sourcefn get_camera_image(&mut self, _client: Rc<RefCell<PhysicsClient>>) -> RgbaImage
fn get_camera_image(&mut self, _client: Rc<RefCell<PhysicsClient>>) -> RgbaImage
determine how you want to get the camera image with this method.