shadowrobot::SRPublisher Class Reference

#include <sr_publisher.h>

List of all members.

Public Member Functions

void publish ()
 SRPublisher (boost::shared_ptr< SRArticulatedRobot > sr_art_robot)
 ~SRPublisher ()
 Destructor.

Private Member Functions

double toRad (double deg)

Private Attributes

NodeHandle n_tilde
NodeHandle node
 ros node handle
Rate publish_rate
 the rate at which the data will be published. This can be set by a parameter in the launch file.
boost::shared_ptr
< SRArticulatedRobot
sr_articulated_robot
 The shadowhand object (can be either an object connected to the real robot or a virtual hand).
Publisher sr_jointstate_pos_pub
 The publisher which publishes the data to the \/{prefix}\/position\/joint_states topic.
Publisher sr_jointstate_target_pub
 The publisher which publishes the data to the \/{prefix}\/target\/joint_states topic.
Publisher sr_pub
 The publisher which publishes the data to the \/{prefix}\/shadowhand_data topic.

Detailed Description

This class publishes data concerning the shadowhand /shadowarm, like position, targets, forces, ... on different topics. To publish those data, just call the publish() function.

The data are published on three different topics. Two of them are joint_states topics (joint names, joint angles, joint velocities, joint efforts), which are then transformed into coordinates by two different robot_state_publisher (a ROS package). This is useful to visualize the data in rviz (part of ROS). A third topic is \/prefix\/shadowhand_data. The messages published on this last topic are better formatted for our hardware.

Definition at line 55 of file sr_publisher.h.


Constructor & Destructor Documentation

shadowrobot::SRPublisher::SRPublisher ( boost::shared_ptr< SRArticulatedRobot sr_art_robot  ) 

Constructor initializing the ROS node, and setting the topic to which it publishes. The frequency at which this node will publish data is set by a parameter, read from ROS parameter server.

Parameters:
sh A Shadowhand or Shadowarm object, where the information to be published comes from.

Definition at line 53 of file sr_publisher.cpp.

shadowrobot::SRPublisher::~SRPublisher (  ) 

Destructor.

Definition at line 78 of file sr_publisher.cpp.


Member Function Documentation

void shadowrobot::SRPublisher::publish (  ) 

The callback method which is called at a given frequency. Gets the data from the shadowhand/shadowarm object.

Definition at line 87 of file sr_publisher.cpp.

double shadowrobot::SRPublisher::toRad ( double  deg  )  [inline, private]

Convert an angle in degree to an angle in radians.

Parameters:
deg the angle in degrees
Returns:
the value in rads.

Definition at line 95 of file sr_publisher.h.


Member Data Documentation

NodeHandle shadowrobot::SRPublisher::n_tilde [private]

Definition at line 76 of file sr_publisher.h.

NodeHandle shadowrobot::SRPublisher::node [private]

ros node handle

Definition at line 76 of file sr_publisher.h.

the rate at which the data will be published. This can be set by a parameter in the launch file.

Definition at line 78 of file sr_publisher.h.

The shadowhand object (can be either an object connected to the real robot or a virtual hand).

Definition at line 81 of file sr_publisher.h.

The publisher which publishes the data to the \/{prefix}\/position\/joint_states topic.

Definition at line 84 of file sr_publisher.h.

The publisher which publishes the data to the \/{prefix}\/target\/joint_states topic.

Definition at line 86 of file sr_publisher.h.

Publisher shadowrobot::SRPublisher::sr_pub [private]

The publisher which publishes the data to the \/{prefix}\/shadowhand_data topic.

Definition at line 88 of file sr_publisher.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator


sr_hand
Author(s): Ugo Cupcic / ugo@shadowrobot.com, contact@shadowrobot.com
autogenerated on Fri Jan 11 09:32:58 2013