dynamic_graph_manager
|
this is this package namespace in order to avoid naming conflict More...
Namespaces | |
specific | |
Types dedicated to identify pairs of (dg,ros) data. | |
Typedefs | |
typedef dynamicgraph::Signal< dynamicgraph::Vector, int > | OutSignal |
typedef dynamicgraph::SignalPtr< dynamicgraph::Vector, int > | InSignal |
typedef std::map< std::string, OutSignal * > | DeviceOutSignalMap |
typedef std::map< std::string, InSignal * > | DeviceInSignalMap |
typedef std::chrono::steady_clock | clock |
clock is the std::chrono::high_resolution_clock object. More... | |
typedef std::map< std::string, dynamicgraph::Vector > | VectorDGMap |
VectorDGMap is a shortcut for the very long type of the map. | |
typedef boost::posix_time::ptime | ptime |
typedef boost::posix_time::seconds | seconds |
typedef boost::posix_time::microseconds | microseconds |
typedef boost::posix_time::time_duration | time_duration |
typedef boost::gregorian::date | date |
typedef dynamicgraph::Vector | Vector |
typedef dynamicgraph::Matrix | Matrix |
typedef Eigen::Transform< double, 3, Eigen::Affine > | MatrixHomogeneous |
typedef Eigen::Matrix< double, 3, 3 > | MatrixRotation |
typedef Eigen::AngleAxis< double > | VectorUTheta |
typedef Eigen::Quaternion< double > | VectorQuaternion |
typedef Eigen::Vector3d | VectorRotation |
typedef Eigen::Vector3d | VectorRollPitchYaw |
typedef Eigen::Matrix< double, 6, 6 > | MatrixForce |
typedef Eigen::Matrix< double, 6, 6 > | MatrixTwist |
typedef dynamicgraph::SignalTimeDependent< int, int > | SignalOUT |
Simple shortcut for code writing convenience. | |
typedef dynamicgraph::SignalPtr< dynamicgraph::Vector, int > | SignalIN |
Simple shortcut for code writing convenience. | |
typedef boost::function< void(int)> | callback_t |
Simple shortcut for code writing convenience. | |
typedef realtime_tools::RealtimePublisher< tf2_msgs::TFMessage > | TfRtPublisher |
Renaming of the tf publisher type. | |
typedef realtime_tools::RealtimePublisher< sensor_msgs::JointState > | JointStateRtPublisher |
Renaming of the joint position publisher type. | |
Functions | |
ros::NodeHandle & | ros_init (std::string node_name) |
rosInit is a global method that uses the structure GlobalRos. More... | |
ros::AsyncSpinner & | ros_spinner (std::string node_name) |
ros_spinner return the async_spinner_. More... | |
void | ros_shutdown (std::string node_name) |
ros_shutdown shuts down ros and stop the ros spinner with the associate name | |
void | ros_shutdown () |
ros_shutdown shuts down ros and stop the ros spinners | |
bool | ros_exist (std::string node_name) |
Check if a node handle has been created or not. | |
void | parse_yaml_node (const YAML::Node &sensors_and_controls, VectorDGMap &out_sensors_map, VectorDGMap &out_motor_controls_map) |
parse_yaml_node allows to parse the yaml node to create the according maps of dynamicgraph::Vector. More... | |
void | makeHeader (std_msgs::Header &header) |
template<typename D , typename S > | |
void | converter (D &dst, const S &src) |
Handle ROS <-> dynamic-graph conversion. More... | |
DG_TO_ROS_IMPL (double) | |
ROS_TO_DG_IMPL (double) | |
DG_TO_ROS_IMPL (unsigned int) | |
ROS_TO_DG_IMPL (unsigned int) | |
DG_TO_ROS_IMPL (Vector) | |
ROS_TO_DG_IMPL (Vector) | |
DG_TO_ROS_IMPL (specific::Vector3) | |
ROS_TO_DG_IMPL (specific::Vector3) | |
DG_TO_ROS_IMPL (Matrix) | |
ROS_TO_DG_IMPL (Matrix) | |
DG_TO_ROS_IMPL (MatrixHomogeneous) | |
ROS_TO_DG_IMPL (MatrixHomogeneous) | |
DG_TO_ROS_IMPL (specific::Twist) | |
ROS_TO_DG_IMPL (specific::Twist) | |
DG_BRIDGE_TO_ROS_MAKE_STAMPED_IMPL (specific::Vector3, vector, ;) | |
DG_BRIDGE_TO_ROS_MAKE_STAMPED_IMPL (MatrixHomogeneous, transform, dst.child_frame_id="";) | |
DG_BRIDGE_TO_ROS_MAKE_STAMPED_IMPL (specific::Twist, twist, ;) | |
DG_BRIDGE_MAKE_SHPTR_IMPL (double) | |
DG_BRIDGE_MAKE_SHPTR_IMPL (unsigned int) | |
DG_BRIDGE_MAKE_SHPTR_IMPL (Vector) | |
DG_BRIDGE_MAKE_SHPTR_IMPL (specific::Vector3) | |
DG_BRIDGE_MAKE_SHPTR_IMPL (Matrix) | |
DG_BRIDGE_MAKE_SHPTR_IMPL (MatrixHomogeneous) | |
DG_BRIDGE_MAKE_SHPTR_IMPL (specific::Twist) | |
DG_BRIDGE_MAKE_STAMPED_IMPL (specific::Vector3, vector, ;) | |
DG_BRIDGE_MAKE_STAMPED_IMPL (MatrixHomogeneous, transform, ;) | |
DG_BRIDGE_MAKE_STAMPED_IMPL (specific::Twist, twist, ;) | |
DG_BRIDGE_MAKE_STAMPED_SHPTR_IMPL (specific::Vector3, vector, ;) | |
DG_BRIDGE_MAKE_STAMPED_SHPTR_IMPL (MatrixHomogeneous, transform, ;) | |
DG_BRIDGE_MAKE_STAMPED_SHPTR_IMPL (specific::Twist, twist, ;) | |
template<typename U , typename V > | |
void | converter (U &dst, V &src) |
If an impossible/unimplemented conversion is required, fail. More... | |
boost::posix_time::ptime | rosTimeToPtime (const ros::Time &rosTime) |
ros::Time | pTimeToRostime (const boost::posix_time::ptime &time) |
std::string | makeSignalString (const std::string &className, const std::string &instanceName, bool isInputSignal, const std::string &signalType, const std::string &signalName) |
void | buildFrom (const MatrixHomogeneous &MH, MatrixTwist &MT) |
template<> | |
void | RosPublish::sendData< std::pair< MatrixHomogeneous, Vector > > (boost::shared_ptr< realtime_tools::RealtimePublisher< DgToRos< std::pair< MatrixHomogeneous, Vector > >::ros_t > > publisher, boost::shared_ptr< DgToRos< std::pair< MatrixHomogeneous, Vector > >::signalIn_t > signal, int time) |
DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN (DeviceSimulator, "DeviceSimulator") | |
dynamic_graph::Device::CLASS_NAME must be the name as the actual device class. | |
ostream & | operator<< (ostream &os, const ExceptionAbstract &error) |
DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN (RosPublish, "RosPublish") | |
DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN (RosQueuedSubscribe, "RosQueuedSubscribe") | |
DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN (RosRobotStatePublisher, "RosRobotStatePublisher") | |
DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN (RosRobotStatePublisherMt, "RosRobotStatePublisherMt") | |
DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN (RosSubscribe, "RosSubscribe") | |
DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN (RosTfListener, "RosTfListener") | |
DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN (RosTime, "RosTime") | |
Variables | |
static std::map< std::string, std::unique_ptr< GlobalRos > > | GLOBAL_ROS_VAR |
GLOBAL_ROS_VAR is global variable that acts as a singleton on the ROS node handle and the spinner. More... | |
static const int | queueSize = 5 |
this is this package namespace in order to avoid naming conflict
typedef std::chrono::steady_clock dynamic_graph::clock |
clock is the std::chrono::high_resolution_clock object.
This typedef is here as a shortcut to simplify the code readability.
void dynamic_graph::converter | ( | D & | dst, |
const S & | src | ||
) |
Handle ROS <-> dynamic-graph conversion.
Implements all ROS/dynamic-graph conversions required by the bridge.
Relies on the DgToRos type trait to make sure valid pair of types are used.
|
inline |
If an impossible/unimplemented conversion is required, fail.
IMPORTANT, READ ME:
If the compiler generates an error in the following function, this is /normal/.
This error means that either you try to use an undefined conversion. You can either fix your code or provide the wanted conversion by updating this header.
void dynamic_graph::parse_yaml_node | ( | const YAML::Node & | sensors_and_controls, |
VectorDGMap & | out_sensors_map, | ||
VectorDGMap & | out_motor_controls_map | ||
) |
parse_yaml_node allows to parse the yaml node to create the according maps of dynamicgraph::Vector.
[in] | sensors_and_controls | is the node that contains the hardware info. |
[out] | out_sensors_map | is the map that contains the sensors data. |
[out] | out_motor_controls_map | is the map that contains the motor controls data. |
ros::NodeHandle & dynamic_graph::ros_init | ( | std::string | node_name | ) |
rosInit is a global method that uses the structure GlobalRos.
Its role is to create the ros::nodeHandle and the ros::spinner once at the first call. It always returns a reference to the node hanlde.
call ros::init
ros::NodeHandle instanciation
If spinner is not created we create it. Here we can safely assume that ros::init was called before.
create the spinner
run the spinner in a different thread
Return a reference to the node handle so any function can use it
call ros::init
ros::NodeHandle instanciation
If spinner is not created we create it. Here we can safely assume that ros::init was called before.
create the spinner
run the spinner in a different thread
Return a reference to the node handle so any function can use it
ros::AsyncSpinner & dynamic_graph::ros_spinner | ( | std::string | node_name | ) |
ros_spinner return the async_spinner_.
Call dynamic_graph ros_init if ros has not been initialized
|
static |
GLOBAL_ROS_VAR is global variable that acts as a singleton on the ROS node handle and the spinner.
The use of the std::unique_ptr allows to delete the object and re-create at will. It is usefull to reset the ros environment specifically for unittesting.
If the node handle does not exist we call the global method ros::init. This method has for purpose to initialize the ROS environment. The creation of ROS object is permitted only after the call of this function. After ros::init being called we create the node hanlde which allows in turn to advertize the ROS services, or create topics (data pipe).