13 #include <yaml-cpp/yaml.h> 15 #include <dynamic-graph/all-signals.h> 16 #include <dynamic-graph/entity.h> 17 #include <dynamic-graph/linear-algebra.h> 24 typedef dynamicgraph::Signal<dynamicgraph::Vector, int> OutSignal;
25 typedef dynamicgraph::SignalPtr<dynamicgraph::Vector, int> InSignal;
26 typedef std::map<std::string, OutSignal*> DeviceOutSignalMap;
27 typedef std::map<std::string, InSignal*> DeviceInSignalMap;
29 class Device :
public dynamicgraph::Entity
53 Device(
const std::string& input_name);
65 virtual void initialize(
const YAML::Node& params);
110 std::cout <<
"\"device.executeGraph\" python command is deprecated, " 111 <<
"please use \"device.execute_graph()\"" << std::endl;
virtual ~Device()
~Device is a default destructor that might overloaded
Definition: device.cpp:118
virtual const std::string & getClassName(void) const
getClassName is an overloaded function from the class Entity.
Definition: device.hh:43
virtual void initialize_from_file(const std::string &yaml_file)
initialize_from_file is the function that initialize the device from a YAML file. ...
Definition: device.cpp:83
virtual void initialize(const YAML::Node ¶ms)
initialize is the function that initialize the device from the YAML paramters
Definition: device.cpp:89
Definition: periodic-call.hh:26
PeriodicCall periodic_call_after_
periodic_call_after_ handle the synchronous command call on the device between getting the sensor dat...
Definition: device.hh:168
void execute_graph_deprecated()
execute_graph is a fonction that execute the graph.
Definition: device.hh:108
std::map< std::string, dynamicgraph::Vector > VectorDGMap
VectorDGMap is a shortcut for the very long type of the map.
Definition: tools.hh:22
virtual void get_controls_to_map(VectorDGMap &motor_controls)
get_controls_to_map is a parser that feed the map "controls" with the output of the DynamicGraph...
Definition: device.cpp:305
YAML::Node params_
params is a YAML node that allow the creation of a modular device
Definition: device.hh:173
this is this package namespace in order to avoid naming conflict
Definition: device.hh:22
virtual void set_sensors_from_map(const VectorDGMap &sensors)
set_sensors_from_map is a parser that feed the map "sensors" with the hardware sensor readings...
Definition: device.cpp:196
PeriodicCall periodic_call_before_
periodic_call_before_ handle the synchronous command call on the device between getting the sensor da...
Definition: device.hh:161
virtual void execute_graph()
execute_graph is a fonction that execute the graph.
Definition: device.cpp:221
static const std::string CLASS_NAME
This is the name of the classe that is used to store the object in the dynamic graph.
Definition: device.hh:36
Device(const std::string &input_name)
Device is the constructor.
Definition: device.cpp:44
DeviceInSignalMap motor_controls_in_
motor_control_in_ is the output motor control for each joint.
Definition: device.hh:147
void initialize_maps(const YAML::Node &sensors_and_controls)
parse_yaml_file fill in the internal maps for sensors and controls.
Definition: device.cpp:146
VectorDGMap sensors_map_
sensors_map_ is a map of dynamicgraph::Vector.
Definition: device.hh:136
VectorDGMap motor_controls_map_
motor_controls_map_ is a map of dynamicgraph::Vector.
Definition: device.hh:153
DeviceOutSignalMap sensors_out_
sensors_out_ is a map of device output signals.
Definition: device.hh:130