SimulationSetup

Trait SimulationSetup 

Source
pub trait SimulationSetup {
    // Required method
    fn set_franka_urdf_path(&self) -> PathBuf;

    // Provided methods
    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§

Source

fn set_franka_urdf_path(&self) -> PathBuf

Return the path to the URDF file of the Franka robot.

Provided Methods§

Source

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

Source

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.

Source

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.

Source

fn get_camera_image(&mut self, _client: Rc<RefCell<PhysicsClient>>) -> RgbaImage

determine how you want to get the camera image with this method.

Implementors§