Public Member Functions | Private Member Functions | Private Attributes
yocs_keyop::KeyOp Class Reference

Keyboard remote control for your robot. More...

#include <keyop.hpp>

List of all members.

Public Member Functions

bool init ()
 Initialises the node.
 KeyOp ()
void spin ()
 Worker thread loop; sends current velocity command at a fixed rate.
 ~KeyOp ()

Private Member Functions

void decrementAngularVelocity ()
 If not already mined, decrement the angular velocities..
void decrementLinearVelocity ()
 If not already minned, decrement the linear velocities..
void disable ()
 Disables commands to the navigation system.
void enable ()
 Reset/re-enable the navigation system.
void incrementAngularVelocity ()
 If not already maxxed, increment the angular velocities..
void incrementLinearVelocity ()
 If not already maxxed, increment the command velocities..
void keyboardInputLoop ()
 The worker thread function that accepts input keyboard commands.
void processKeyboardInput (char c)
 Process individual keyboard inputs.
void resetVelocity ()
void restoreTerminal ()

Private Attributes

bool accept_incoming_
double angular_vel_max_
double angular_vel_step_
geometry_msgs::TwistPtr cmd_
geometry_msgs::TwistStampedPtr cmd_stamped_
ros::Publisher disable_motors_publisher_
ros::Publisher enable_motors_publisher_
int key_file_descriptor_
bool last_zero_vel_sent_
double linear_vel_max_
double linear_vel_step_
std::string name_
struct termios original_terminal_state_
bool power_status_
bool quit_requested_
ecl::Thread thread_
ros::Publisher velocity_publisher_
bool wait_for_connection_

Detailed Description

Keyboard remote control for your robot.

Definition at line 22 of file keyop.hpp.


Constructor & Destructor Documentation

Definition at line 22 of file keyop.cpp.

Definition at line 38 of file keyop.cpp.


Member Function Documentation

If not already mined, decrement the angular velocities..

Definition at line 408 of file keyop.cpp.

If not already minned, decrement the linear velocities..

Definition at line 370 of file keyop.cpp.

void yocs_keyop::KeyOp::disable ( ) [private]

Disables commands to the navigation system.

This does the following things:

  • Disables power to the navigation motors (via device_manager).
    Parameters:
    msg

Definition at line 300 of file keyop.cpp.

void yocs_keyop::KeyOp::enable ( ) [private]

Reset/re-enable the navigation system.

  • resets the command velocities.
  • reenable power if not enabled.

Definition at line 327 of file keyop.cpp.

If not already maxxed, increment the angular velocities..

Definition at line 389 of file keyop.cpp.

If not already maxxed, increment the command velocities..

Definition at line 351 of file keyop.cpp.

Initialises the node.

Definition at line 46 of file keyop.cpp.

The worker thread function that accepts input keyboard commands.

This is ok here - but later it might be a good idea to make a node which posts keyboard events to a topic. Recycle common code if used by many!

Definition at line 195 of file keyop.cpp.

void yocs_keyop::KeyOp::processKeyboardInput ( char  c) [private]

Process individual keyboard inputs.

Parameters:
ckeyboard input.

Definition at line 231 of file keyop.cpp.

Definition at line 424 of file keyop.cpp.

Worker thread loop; sends current velocity command at a fixed rate.

It also process ros functions as well as aborting when requested.

Definition at line 150 of file keyop.cpp.


Member Data Documentation

Definition at line 40 of file keyop.hpp.

Definition at line 46 of file keyop.hpp.

Definition at line 46 of file keyop.hpp.

geometry_msgs::TwistPtr yocs_keyop::KeyOp::cmd_ [private]

Definition at line 43 of file keyop.hpp.

geometry_msgs::TwistStampedPtr yocs_keyop::KeyOp::cmd_stamped_ [private]

Definition at line 44 of file keyop.hpp.

Definition at line 38 of file keyop.hpp.

Definition at line 38 of file keyop.hpp.

Definition at line 68 of file keyop.hpp.

Definition at line 39 of file keyop.hpp.

Definition at line 45 of file keyop.hpp.

Definition at line 45 of file keyop.hpp.

std::string yocs_keyop::KeyOp::name_ [private]

Definition at line 47 of file keyop.hpp.

Definition at line 69 of file keyop.hpp.

Definition at line 41 of file keyop.hpp.

Definition at line 67 of file keyop.hpp.

ecl::Thread yocs_keyop::KeyOp::thread_ [private]

Definition at line 70 of file keyop.hpp.

Definition at line 38 of file keyop.hpp.

Definition at line 42 of file keyop.hpp.


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


yocs_keyop
Author(s): Daniel Stonier, Marcus Liebhardt
autogenerated on Thu Jun 6 2019 21:47:21