Pogosim
Loading...
Searching...
No Matches
robot.h File Reference
#include <vector>
#include <cmath>
#include <set>
#include <queue>
#include <chrono>
#include <SDL2/SDL.h>
#include <box2d/box2d.h>
#include "utils.h"
#include "render.h"
#include "colormaps.h"
#include "spogobot.h"
#include "objects.h"

Go to the source code of this file.

Classes

class  MsgSuccessRate
 Abstract base class for message success rate calculations. More...
class  DynamicMsgSuccessRate
 Class for dynamic message success rate calculation using a configurable formula. More...
class  ConstMsgSuccessRate
 Class for constant message success rate calculation. More...
class  PogobotObject
 Class representing a simulated Pogobot. More...
class  PogobjectObject
 Class representing a simulated Pogobject. More...
class  Pogowall
 Class representing a simulated Pogowall. More...
class  MembraneObject
 Class representing a simulated Membrane, with a pogowall on each side. More...
struct  MembraneObject::Dot
struct  MembraneObject::Joint
class  ActiveObject
 Class representing an active object, with a pogowall on each side. More...

Enumerations

enum class  ShapeType { Circle , Ellipse , Polygon }
 Enumeration to select the shape type of the robot's body. More...

Functions

std::string log_current_robot ()
 Returns a log string for the current robot.
MsgSuccessRatemsg_success_rate_factory (Configuration const &config)
 Factory of MsgSuccessRate, from a given configuration.
uint64_t get_current_time_microseconds ()
 Retrieves the current time in microseconds.

Variables

PogobotObjectcurrent_robot
int UserdataSize
void * mydata
uint64_t sim_starting_time_microseconds

Enumeration Type Documentation

◆ ShapeType

enum class ShapeType
strong

Enumeration to select the shape type of the robot's body.

Enumerator
Circle 

Use a circular shape.

Ellipse 

Use an elliptical shape (approximated by a polygon).

Polygon 

Use an arbitrary polygon shape defined by vertices.

Function Documentation

◆ get_current_time_microseconds()

uint64_t get_current_time_microseconds ( )

Retrieves the current time in microseconds.

Computes and returns the current simulation time in microseconds.

Returns
uint64_t Current time in microseconds.

◆ log_current_robot()

std::string log_current_robot ( )

Returns a log string for the current robot.

This function gathers and returns a string containing relevant log information for the currently active robot.

Returns
std::string A string representing the current robot's log.

◆ msg_success_rate_factory()

MsgSuccessRate * msg_success_rate_factory ( Configuration const & config)

Factory of MsgSuccessRate, from a given configuration.

Parameters
configConfiguration entry describing the object properties.

Variable Documentation

◆ current_robot

PogobotObject* current_robot
extern

◆ mydata

void* mydata
extern

◆ sim_starting_time_microseconds

uint64_t sim_starting_time_microseconds
extern

◆ UserdataSize

int UserdataSize
extern