Public Member Functions | Private Member Functions | Private Attributes
ros_control_boilerplate::ControllerToCSV Class Reference

#include <controller_to_csv.h>

List of all members.

Public Member Functions

 ControllerToCSV (const std::string &topic)
 Constructor.
bool recordAll ()
 Whether to record at a specific frequency, or record all incoming data.
void startRecording (const std::string &file_name)
 Start the data collection.
void stopRecording ()
 End recording.
 ~ControllerToCSV ()
 Destructor.

Private Member Functions

void stateCB (const control_msgs::JointTrajectoryControllerState::ConstPtr &state)
 Callback from ROS message.
void update (const ros::TimerEvent &e)
 Recieve data from controller via ROS message.
bool waitForSubscriber (const ros::Subscriber &sub, const double &wait_time=10.0)
 Check if topic has been connected to successfully.
bool writeToFile ()
 Send all resulting data to file.

Private Attributes

control_msgs::JointTrajectoryControllerState current_state_
std::string file_name_
bool first_update_
std::string name_ = "controller_to_csv"
ros::NodeHandle nh_
ros::Timer non_realtime_loop_
double record_hz_
bool recording_started_
ros::Subscriber state_sub_
std::vector
< control_msgs::JointTrajectoryControllerState > 
states_
std::vector< ros::Timetimestamps_

Detailed Description

Definition at line 51 of file controller_to_csv.h.


Constructor & Destructor Documentation

Constructor.

Parameters:
topic- ROS message to listen to from controller

Definition at line 51 of file controller_to_csv.cpp.

Destructor.

Definition at line 83 of file controller_to_csv.cpp.


Member Function Documentation

Whether to record at a specific frequency, or record all incoming data.

Definition at line 88 of file controller_to_csv.cpp.

void ros_control_boilerplate::ControllerToCSV::startRecording ( const std::string &  file_name)

Start the data collection.

Definition at line 111 of file controller_to_csv.cpp.

void ros_control_boilerplate::ControllerToCSV::stateCB ( const control_msgs::JointTrajectoryControllerState::ConstPtr &  state) [private]

Callback from ROS message.

Definition at line 93 of file controller_to_csv.cpp.

End recording.

Definition at line 154 of file controller_to_csv.cpp.

Recieve data from controller via ROS message.

Definition at line 130 of file controller_to_csv.cpp.

bool ros_control_boilerplate::ControllerToCSV::waitForSubscriber ( const ros::Subscriber sub,
const double &  wait_time = 10.0 
) [private]

Check if topic has been connected to successfully.

Definition at line 216 of file controller_to_csv.cpp.

Send all resulting data to file.

Definition at line 160 of file controller_to_csv.cpp.


Member Data Documentation

control_msgs::JointTrajectoryControllerState ros_control_boilerplate::ControllerToCSV::current_state_ [private]

Definition at line 108 of file controller_to_csv.h.

Definition at line 101 of file controller_to_csv.h.

Definition at line 93 of file controller_to_csv.h.

std::string ros_control_boilerplate::ControllerToCSV::name_ = "controller_to_csv" [private]

Definition at line 87 of file controller_to_csv.h.

Definition at line 90 of file controller_to_csv.h.

Definition at line 111 of file controller_to_csv.h.

Definition at line 98 of file controller_to_csv.h.

Definition at line 94 of file controller_to_csv.h.

Definition at line 97 of file controller_to_csv.h.

std::vector<control_msgs::JointTrajectoryControllerState> ros_control_boilerplate::ControllerToCSV::states_ [private]

Definition at line 104 of file controller_to_csv.h.

Definition at line 105 of file controller_to_csv.h.


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


ros_control_boilerplate
Author(s): Dave Coleman
autogenerated on Thu Jun 6 2019 20:37:19