tags.hpp
Go to the documentation of this file.
1 /// @file tags.hpp
2 ///
3 /// @brief defines tag dispatching types used throughout grl
4 ///
5 /// http://www.boost.org/community/generic_programming.html#tag_dispatching
6 /// http://barendgehrels.blogspot.com/2010/10/tag-dispatching-by-type-tag-dispatching.html
7 
8 #ifndef _GRL_TAGS_HPP
9 #define _GRL_TAGS_HPP
10 
11 #include <boost/geometry/core/tags.hpp>
12 #include <boost/units/physical_dimensions/torque.hpp>
13 #include <boost/units/physical_dimensions/plane_angle.hpp>
14 #include <boost/units/physical_dimensions/torque.hpp>
15 #include <boost/units/physical_dimensions/force.hpp>
16 #include <boost/units/physical_dimensions/angular_velocity.hpp>
17 #include <boost/units/physical_dimensions/time.hpp>
18 
19 namespace grl {
20 
21  struct time_point_tag : boost::units::time_base_dimension {}; ///< single point in time relative to some start point
22  struct time_duration_tag : boost::units::time_base_dimension {}; ///< used for periodic events
23 
24  struct time_step_tag : time_duration_tag {}; ///< time step between measurements
25 
26  struct joint_tag{}; // identifies a joint, such as on a robot arm
27 
30 
31 
32  struct device_tag{}; ///< identifies a type of device
33 
34  struct state_tag{}; ///< identifies data representing the state of a sytem
35  struct command_tag{}; ///< data for changing a system's physical state, such as joint angles to be sent to a robot arm.
36  struct constraint_tag{}; ///< Represents a system contraint, such as a max velocity limit
37  struct external_state_tag{}; ///< @todo consider eliminating/replacing external state tag
38  struct interpolated_state_tag{}; ///< @todo consider eliminating/replacing interpolated state tag
39 
40  struct wrench_tag{}; // https://en.wikipedia.org/wiki/Screw_theory#Wrench
41 
42  /// @todo how close is this to a 1d linestring? Or maybe an nd linestring if you even represent dh params this way?
43  struct open_chain_tag : boost::geometry::single_tag, state_tag {};
44 
47 
48  /// joint angle
49  struct revolute_joint_angle_open_chain_state_tag : revolute_joint_tag, boost::units::plane_angle_base_dimension, open_chain_tag {};
50 
51  /// interpolated joint angle
53 
54  /// joint velocity
55  struct revolute_joint_velocity_open_chain_state_tag : revolute_joint_tag, boost::units::angular_velocity_dimension, open_chain_tag {};
56 
57  /// joint velocity constraint (ex: max velocity)
59 
60  /// joint torque
62 
63  /// external joint torque, i.e. torques applied to an arm excluding those caused by the mass of the arm itself and gravity
65 
66  /// external forces, i.e. forces applied to an arm excluding those caused by the mass of the arm itself and gravity
67  struct cartesian_external_force_tag : external_state_tag, boost::units::force_dimension, boost::geometry::cartesian_tag {};
68 
69  /// commanded time stamp, the time at which a command should be completed
71 
72  /// the time duration over which a command should be completed
74 
75  /// commanded joint angle
76  struct revolute_joint_angle_open_chain_command_tag : revolute_joint_tag, command_tag, boost::units::plane_angle_base_dimension, open_chain_tag {};
78  struct cartesian_wrench_command_tag : boost::geometry::single_tag, command_tag, boost::geometry::cartesian_tag {};
79  /// @todo add single_tag_of implementation for all joint types @see boost/geometry/core/tags.hpp for reference.
80 }
81 
82 #endif
joint velocity constraint (ex: max velocity)
Definition: tags.hpp:58
commanded time stamp, the time at which a command should be completed
Definition: tags.hpp:70
used for periodic events
Definition: tags.hpp:22
external joint torque, i.e. torques applied to an arm excluding those caused by the mass of the arm i...
Definition: tags.hpp:64
Represents a system contraint, such as a max velocity limit.
Definition: tags.hpp:36
data for changing a system&#39;s physical state, such as joint angles to be sent to a robot arm...
Definition: tags.hpp:35
identifies a type of device
Definition: tags.hpp:32
the time duration over which a command should be completed
Definition: tags.hpp:73
time step between measurements
Definition: tags.hpp:24
external forces, i.e. forces applied to an arm excluding those caused by the mass of the arm itself a...
Definition: tags.hpp:67
identifies data representing the state of a sytem
Definition: tags.hpp:34
single point in time relative to some start point
Definition: tags.hpp:21