|
| | MembraneObject (uint16_t _id, float _x, float _y, ObjectGeometry &geom, b2WorldId world_id, size_t _userdatasize, float _communication_radius=80.0f, std::unique_ptr< MsgSuccessRate > _msg_success_rate=std::make_unique< ConstMsgSuccessRate >(0.5), float _temporal_noise_stddev=0.0f, float _linear_damping=0.0f, float _angular_damping=0.0f, float _density=10.0f, float _friction=0.3f, float _restitution=0.5f, float _max_linear_speed=100.0f, float _max_angular_speed=1.0f, float _linear_noise_stddev=0.0f, float _angular_noise_stddev=0.0f, unsigned int _num_dots=100, float _dot_radius=10.0f, int _cross_span=3, float _stiffness=30.f, std::string _colormap="rainbow", std::string const &_category="robots") |
| | MembraneObject (Simulation *simulation, uint16_t _id, float _x, float _y, b2WorldId world_id, size_t _userdatasize, Configuration const &config, std::string const &_category="robots") |
| | Constructs a PogobotObject from a configuration entry.
|
| virtual void | set_motor (motor_id motor, int speed) override |
| | Updates the motor speed of the robot and recalculates its velocities. Pogobjects do not move, so this method will always set the motors to 0.
|
| virtual b2Vec2 | get_position () const override |
| | Retrieves the object's current position.
|
| virtual void | render (SDL_Renderer *, b2WorldId) const override |
| | Renders the robot on the given SDL renderer.
|
| virtual bool | is_tangible () const override |
| | Returns whether this object is tangible (e.g. collisions, etc) or not.
|
| virtual void | move (float x, float y, float theta=NAN) override |
| | Move the object to a given coordinate.
|
| virtual arena_polygons_t | generate_contours (std::size_t points_per_contour=0) const override |
| | Return one or more polygonal contours that represent the current geometry of the object.
|
| | Pogowall (uint16_t _id, float _x, float _y, ObjectGeometry &geom, b2WorldId world_id, size_t _userdatasize, float _communication_radius=80.0f, std::unique_ptr< MsgSuccessRate > _msg_success_rate=std::make_unique< ConstMsgSuccessRate >(0.5), float _temporal_noise_stddev=0.0f, float _linear_damping=0.0f, float _angular_damping=0.0f, float _density=10.0f, float _friction=0.3f, float _restitution=0.5f, float _max_linear_speed=100.0f, float _max_angular_speed=1.0f, float _linear_noise_stddev=0.0f, float _angular_noise_stddev=0.0f, std::string const &_category="robots") |
| | Pogowall (Simulation *simulation, uint16_t _id, float _x, float _y, b2WorldId world_id, size_t _userdatasize, Configuration const &config, std::string const &_category="robots") |
| | Constructs a PogobotObject from a configuration entry.
|
| virtual b2Vec2 | get_IR_emitter_position (ir_direction dir) const override |
| | Retrieves the IR emitters current positions.
|
| virtual float | get_IR_emitter_angle (ir_direction dir) const override |
| | World-frame bearing of the chosen IR emitter.
|
| virtual void | render_communication_channels (SDL_Renderer *, b2WorldId) const override |
| | Renders the communication channels originating from this robot.
|
| | PogobotObject (uint16_t _id, float _x, float _y, ObjectGeometry &geom, b2WorldId world_id, size_t _userdatasize, float _communication_radius=80.0f, std::unique_ptr< MsgSuccessRate > _msg_success_rate=std::make_unique< ConstMsgSuccessRate >(0.5), float _temporal_noise_stddev=0.0f, float _linear_damping=0.0f, float _angular_damping=0.0f, float _density=10.0f, float _friction=0.3f, float _restitution=0.5f, float _max_linear_speed=100.0f, float _max_angular_speed=1.0f, float _linear_noise_stddev=0.0f, float _angular_noise_stddev=0.0f, bool _rotate_LEDs_45_deg=false, std::pair< int16_t, int16_t > angular_systematic_bias_domain={0, 0}, std::pair< int16_t, int16_t > photosensors_systematic_bias_domain={0, 0}, float _photosensors_noise_stddev=0.0f, std::string const &_category="robots", bool dummy=false) |
| | PogobotObject (Simulation *simulation, uint16_t _id, float _x, float _y, b2WorldId world_id, size_t _userdatasize, Configuration const &config, std::string const &_category="robots") |
| | Constructs a PogobotObject from a configuration entry.
|
| virtual void | launch_user_step (float t) override |
| | Launches the user-defined step function.
|
| void | register_stop_watch (time_reference_t *sw) |
| | Registers a stop watch with the robot.
|
| void | enable_stop_watches () |
| | Enables all registered stop watches.
|
| void | disable_stop_watches () |
| | Disables all registered stop watches.
|
| virtual void | update_time () |
| | Updates the object's current time.
|
| virtual b2Vec2 | get_photosensor_position (uint8_t sensor_number) const |
| | Returns the position of a photosensor.
|
| void | send_to_neighbors (ir_direction dir, short_message_t *const message) |
| | Sends a short message to neighboring robots.
|
| void | send_to_neighbors (ir_direction dir, message_t *const message) |
| | Sends a message to neighboring robots.
|
| void | receive_message (message_t *const message, PogobotObject *source) |
| | Receive a message from another robot.
|
| bool | enable_user_steps () const |
| | Check if user steps are enabled.
|
| void | sleep_µs (uint64_t microseconds) |
| | Simulate a sleep on a single robot.
|
| | PhysicalObject (uint16_t _id, float _x, float _y, ObjectGeometry &geom, b2WorldId world_id, float _linear_damping=0.0f, float _angular_damping=0.0f, float _density=10.0f, float _friction=0.3f, float _restitution=0.5f, std::string const &_category="objects") |
| | Constructs a PhysicalObject.
|
| | PhysicalObject (Simulation *simulation, uint16_t _id, float _x, float _y, b2WorldId world_id, Configuration const &config, std::string const &_category="objects") |
| | Constructs a PhysicalObject from a configuration entry.
|
| float | get_angle () const |
| | Retrieves the object's current orientation angle.
|
| float | get_angular_velocity () const |
| | Retrieves the object's current angular velocity.
|
| b2Vec2 | get_linear_acceleration () const |
| | Retrieves the object's current angular velocity.
|
| | Object (float _x, float _y, ObjectGeometry &_geom, std::string const &_category="objects") |
| | Constructs an Object.
|
| | Object (Simulation *simulation, float _x, float _y, Configuration const &config, std::string const &_category="objects") |
| | Constructs an Object from a configuration entry.
|
| virtual | ~Object () |
| | Destructor.
|
| ObjectGeometry * | get_geometry () |
| | Return the object's geometry.
|
|
| void * | data = nullptr |
| | Pointer to user data.
|
| void(* | user_init )(void) = nullptr |
| | Pointer to a user-defined initialization function.
|
| void(* | user_step )(void) = nullptr |
| | Pointer to a user-defined step function.
|
| bool | _enable_user_steps = true |
| | Whether we allow user programs to be executed.
|
| void(* | callback_export_data )(void) = nullptr |
| | Callback to export data.
|
| uint32_t | pogobot_ticks = 0 |
| | Simulation ticks counter.
|
| uint8_t | main_loop_hz = 60 |
| | Main loop frequency in Hz.
|
| uint8_t | max_nb_processed_msg_per_tick = 3 |
| | Maximum number of messages processed per tick.
|
| void(* | msg_rx_fn )(message_t *) = nullptr |
| | Function pointer for message reception.
|
| bool(* | msg_tx_fn )(void) = nullptr |
| | Function pointer for message transmission.
|
| int8_t | error_codes_led_idx = 3 |
| | LED index for error codes.
|
| time_reference_t | _global_timer |
| | Global timer reference.
|
| time_reference_t | timer_main_loop |
| | Main loop timer reference.
|
| uint32_t | _current_time_milliseconds = 0 |
| | Current time in milliseconds.
|
| uint32_t | _error_code_initial_time = 0 |
| | Initial time for error code reporting.
|
| uint8_t | percent_msgs_sent_per_ticks = 20 |
| | Percentage of messages sent per tick.
|
| uint32_t | nb_msgs_sent = 0 |
| | Counter for messages sent.
|
| uint32_t | nb_msgs_recv = 0 |
| | Counter for messages received.
|
| std::set< time_reference_t * > | stop_watches |
| | Set of registered stop watches.
|
| float | radius |
| | Radius of this robot.
|
| float | left_motor_speed = 0 |
| | Current speed of the left motor.
|
| float | right_motor_speed = 0 |
| | Current speed of the right motor.
|
| bool | show_lateral_leds = false |
| | Whether to render lateral LEDs.
|
| std::vector< color_t > | leds = std::vector<color_t>(5, {0, 0, 0}) |
| | LED colors for the robot.
|
| std::vector< std::vector< PogobotObject * > > | neighbors {ir_all+1} |
| | Pointers to neighboring robots.
|
| std::queue< message_t > | messages |
| | Queue of incoming messages.
|
| float | communication_radius |
| | Communication radius of each IR emitter.
|
| std::unique_ptr< MsgSuccessRate > | msg_success_rate |
| | Probability of successfully sending a message.
|
| uint64_t | current_time_microseconds = 0LL |
| | Current time in microseconds.
|
| uint8_t | motor_dir_mem [3] = {0, 1, 0} |
| | Motors current direction and power ([R, L, B]).
|
| uint8_t | motor_dir [3] = {0, 1, 0} |
| uint16_t | motor_power_mem [3] = {512, 512, 0} |
| std::vector< int16_t > | photosensors_biases = {0, 0, 0} |
| | Level of systematic bias to apply to each photosensor.
|
| float | photosensors_noise_stddev = 0.0f |
| | Stddev of the Gaussian noise to apply to photosensors light levels.
|
| int16_t | angular_bias = 0 |
| uint16_t | id |
| | Object identifier.
|
| float | x |
| | X position.
|
| float | y |
| | Y position.
|
| float | theta |
| | Orientation (in rad).
|
| std::string | category |
| | Category of the object.
|
Class representing a simulated Membrane, with a pogowall on each side.