Loading...
Searching...
No Matches
Signals

This part provides the mechanism to transfer information from one entity to another.

This part provides the mechanism to transfer information from one entity to another.

There are three main types of signals, all deriving from the common class dynamicgraph::SignalBase :

  • dynamicgraph::Signal : a "normal" signal, passing data around by value
  • dynamicgraph::SignalPtr : a signal used for efficient passing of large data, by reference (or rather, C pointers)*
  • dynamicgraph::SignalTimeDependent : a signal that enforces a time dependency between other signals, making sure its inputs are up to date on access, using a incrementing time tick as reference.


* Note: this may cause a problem if this package is used in a multithreaded program.

Signals can be grouped together using dynamicgraph::SignalArray.

Signals implement a caching mechanism by storing the last computation time tick.

Some signals can be plugged ("plug" script command) into one another or set through shell commands.

For more information, please see the individual signal pages.

Samples

  • The following code ensures the jacobian output signal uses up-to-date values for its computations, when accessed.
// This signal returns the Jacobian of the current value
// according to the robot state
dg::SignalTimeDependent<ml::Matrix,int> jacobianSOUT;
(...)
jacobianSOUT.addDependency( positionSIN );
jacobianSOUT.addDependency( articularJacobianSIN );