1 #ifndef CONTROL_FORCE_SENSORS_H
2 #define CONTROL_FORCE_SENSORS_H
5 #include <KrisLibrary/math3d/primitives.h>
10 using namespace Math3D;
48 virtual const char* Type()
const override {
return "ContactSensor"; }
55 virtual map<string,string>
Settings()
const override;
56 virtual bool GetSetting(
const string& name,
string& str)
const override;
57 virtual bool SetSetting(
const string& name,
const string& str)
override;
58 virtual void DrawGL(
const RobotModel& robot,
const vector<double>& measurements)
override;
69 Real falloffCoefficient;
98 virtual const char* Type()
const override {
return "ForceTorqueSensor"; }
105 virtual map<string,string>
Settings()
const override;
106 virtual bool GetSetting(
const string& name,
string& str)
const override;
107 virtual bool SetSetting(
const string& name,
const string& str)
override;
Simulates a force-torque sensor mounted between a link and its parent. Can be configured to be up to ...
Definition: ForceSensors.h:94
virtual void GetMeasurements(vector< double > &values) const override
Must be overridden to returns a list of all measurements.
virtual void MeasurementNames(vector< string > &names) const override
Must be overridden to produce a list of names of each measurement.
virtual bool GetSetting(const string &name, string &str) const override
Get a named setting. Returns false if the name is not supported.
virtual void SimulateKinematic(RobotModel &robot, WorldModel &world) override
Updates the sensor for a kinematic world. Useful for non-simulation debugging.
int link
The link on which the sensor is located (between link and parent)
Definition: ForceSensors.h:110
virtual void DrawGL(const RobotModel &robot, const vector< double > &measurements) override
Vector3 t
Measurement: the force/torque at the given position, on the link (negative on the parent link)
Definition: ForceSensors.h:115
virtual map< string, string > Settings() const override
Returns a map of all current name-value pairs of the sensor's settings.
virtual bool SetSetting(const string &name, const string &str) override
virtual void SetMeasurements(const vector< double > &values) override
virtual void Simulate(SimRobotController *robot, Simulator *sim) override
Called whenever the sensor is updated from the simulaton.
virtual void Reset() override
Should be overridden if the sensor is stateful to reset to an initial state.
Vector3 tVariance
Estimated variance of the sensor (default 0)
Definition: ForceSensors.h:113
The main robot type used in RobotSim.
Definition: Robot.h:84
A sensor base class. A SensorBase should allow a Controller to both connect to a simulation as well a...
Definition: Sensor.h:56
A class containing information about an ODE-simulated and controlled robot.
Definition: SimRobotController.h:20
A physical simulator for a WorldModel.
Definition: Simulator.h:70
The main world class containing multiple robots, objects, and static geometries (terrains)....
Definition: World.h:25