KaCanOpen
 All Classes Functions Variables Typedefs Enumerations Pages
Public Member Functions | List of all members
kaco::JointStateSubscriber Class Reference

This class provides a Subscriber implementation for use with kaco::Bridge and a CiA 402 motor device. It listens for JointState messages from ROS common_messages package and updates the motor device accordingly. More...

#include <joint_state_subscriber.h>

Inheritance diagram for kaco::JointStateSubscriber:
Inheritance graph
[legend]
Collaboration diagram for kaco::JointStateSubscriber:
Collaboration graph
[legend]

Public Member Functions

 JointStateSubscriber (Device &device, int32_t position_0_degree, int32_t position_360_degree, std::string topic_name="")
 Constructor. More...
 
void advertise () override
 

Detailed Description

This class provides a Subscriber implementation for use with kaco::Bridge and a CiA 402 motor device. It listens for JointState messages from ROS common_messages package and updates the motor device accordingly.

Currenty, only the motor angle is regarded. You have to initialize the motor on your own. The motor is expected to be in position mode and operational state.

Definition at line 54 of file joint_state_subscriber.h.

Constructor & Destructor Documentation

kaco::JointStateSubscriber::JointStateSubscriber ( Device device,
int32_t  position_0_degree,
int32_t  position_360_degree,
std::string  topic_name = "" 
)

Constructor.

Parameters
devicea CiA 402 compliant motor device object
position_0_degreeThe motor position (dictionary entry "Position actual value") which represents a 0 degree angle.
position_360_degreeLike position_0_degree for 360 degree state.
topic_nameCustom topic name. Leave out for default.
Exceptions
std::runtime_errorif device is not CiA 402 compliant and in position_mode.

Definition at line 44 of file joint_state_subscriber.cpp.

Member Function Documentation

void kaco::JointStateSubscriber::advertise ( )
overridevirtual
See also
interface Subscriber

Implements kaco::Subscriber.

Definition at line 74 of file joint_state_subscriber.cpp.


The documentation for this class was generated from the following files: