#include <cmd_server.hpp>
Public Member Functions | |
CmdServer (ros::NodeHandle &nh) | |
void | robotReady () |
Robot motion executed when cmdServer is ready. More... | |
void | setupServer () |
void | stopServer () |
void | waitForCmd () |
~CmdServer () | |
Protected Member Functions | |
void | init () |
void | loadParams () |
void | rosSetup () |
Protected Attributes | |
ros::NodeHandle | nh_ |
Private Member Functions | |
void | accelCB (const marty_msgs::Accelerometer &msg) |
void | arms (int r_angle=0, int l_angle=0) |
void | ballCB (const geometry_msgs::Pose2D &msg) |
void | battCB (const std_msgs::Float32 &msg) |
void | celebrate (int move_time=4000) |
bool | cmd_service (marty_msgs::Command::Request &req, marty_msgs::Command::Response &res) |
void | currCB (const marty_msgs::MotorCurrents &msg) |
void | dance (int robot_id) |
void | demo () |
void | eyes (int amount=0, int amount2=0) |
void | getData (int sensor, int id) |
void | gpioCB (const marty_msgs::GPIOs &msg) |
void | hello () |
void | kick (int side=CMD_LEFT, int move_time=3000) |
void | lean (int dir, int amount=100, int move_time=2000) |
void | liftLeg (int leg, int amount=100, int move_time=2000) |
void | lowerLeg (int move_time=1000) |
void | moveJoint (int side, int joint, int amount, int move_time=2000) |
void | playSound (int freq=440, int duration=500) |
void | playSounds (std::vector< int > sounds) |
void | runCommand (vector< int > data) |
Runs commands received by the server. More... | |
void | runSockCommand (vector< int8_t > data) |
void | sideStep (int side, int num_steps=1, int move_time=1000, int step_length=50) |
void | sitBack (int duration) |
void | standStraight (int move_time=1000) |
void | stopRobot () |
void | swingArms (int r_arm, int l_arm, int duration=2000, int cycles=4) |
void | swingJoints (marty_msgs::ServoMsgArray, int duration=2000, int cycles=4) |
void | testLeg (int side, int duration) |
void | walk (int num_steps=2, int turn=0, int move_time=3000, int step_length=50, int side=-1) |
Private Attributes | |
marty_msgs::Accelerometer | accel_data_ |
ros::Subscriber | accel_sub_ |
geometry_msgs::Pose2D | ball_pos_ |
ros::Subscriber | ball_sub_ |
std_msgs::Float32 | batt_data_ |
ros::Subscriber | batt_sub_ |
bool | busy_ |
std::vector< int > | cmd_data_ |
std::vector< std::vector< int > > | cmd_queue_ |
ros::ServiceServer | cmd_srv_ |
marty_msgs::MotorCurrents | curr_data_ |
ros::Subscriber | curr_sub_ |
marty_msgs::GPIOs | gpio_data_ |
ros::Subscriber | gpio_sub_ |
float | interp_dt_ |
bool | ready_move_ |
bool | resp_request_ |
MartyCore * | robot_ |
bool | ros_cmd_ |
int | sock_ |
bool | turn_spot_ |
float | val_request_ |
Definition at line 91 of file cmd_server.hpp.
CmdServer::CmdServer | ( | ros::NodeHandle & | nh | ) |
Definition at line 530 of file cmd_server.cpp.
CmdServer::~CmdServer | ( | ) |
Definition at line 537 of file cmd_server.cpp.
|
inlineprivate |
Definition at line 131 of file cmd_server.hpp.
|
private |
Definition at line 307 of file cmd_server.cpp.
|
inlineprivate |
Definition at line 134 of file cmd_server.hpp.
|
inlineprivate |
Definition at line 132 of file cmd_server.hpp.
|
private |
Definition at line 250 of file cmd_server.cpp.
|
private |
Definition at line 569 of file cmd_server.cpp.
|
inlineprivate |
Definition at line 133 of file cmd_server.hpp.
|
private |
Definition at line 302 of file cmd_server.cpp.
|
private |
Definition at line 312 of file cmd_server.cpp.
|
private |
Definition at line 167 of file cmd_server.cpp.
|
private |
Definition at line 171 of file cmd_server.cpp.
|
inlineprivate |
Definition at line 130 of file cmd_server.hpp.
|
private |
Definition at line 113 of file cmd_server.cpp.
|
protected |
Definition at line 551 of file cmd_server.cpp.
|
private |
Definition at line 154 of file cmd_server.cpp.
|
private |
Definition at line 238 of file cmd_server.cpp.
|
private |
Definition at line 261 of file cmd_server.cpp.
|
protected |
Definition at line 541 of file cmd_server.cpp.
|
private |
Definition at line 279 of file cmd_server.cpp.
|
private |
Definition at line 194 of file cmd_server.cpp.
|
private |
|
private |
Definition at line 499 of file cmd_server.cpp.
void CmdServer::robotReady | ( | ) |
Robot motion executed when cmdServer is ready.
Definition at line 16 of file cmd_server.cpp.
|
protected |
Definition at line 560 of file cmd_server.cpp.
|
private |
Runs commands received by the server.
Here is where you may add new functions for Marty to do. Don't forget to create a CmdServer::function() as well as its definition in the cmd_server.hpp
data | Received data array |
Definition at line 48 of file cmd_server.cpp.
|
private |
Definition at line 98 of file cmd_server.cpp.
void CmdServer::setupServer | ( | ) |
Definition at line 576 of file cmd_server.cpp.
|
private |
Definition at line 472 of file cmd_server.cpp.
|
private |
Definition at line 422 of file cmd_server.cpp.
|
private |
Definition at line 486 of file cmd_server.cpp.
|
private |
Definition at line 516 of file cmd_server.cpp.
void CmdServer::stopServer | ( | ) |
Definition at line 598 of file cmd_server.cpp.
|
private |
Definition at line 427 of file cmd_server.cpp.
|
private |
Definition at line 448 of file cmd_server.cpp.
|
private |
Definition at line 411 of file cmd_server.cpp.
void CmdServer::waitForCmd | ( | ) |
Definition at line 602 of file cmd_server.cpp.
|
private |
Definition at line 126 of file cmd_server.cpp.
|
private |
Definition at line 155 of file cmd_server.hpp.
|
private |
Definition at line 162 of file cmd_server.hpp.
|
private |
Definition at line 158 of file cmd_server.hpp.
|
private |
Definition at line 165 of file cmd_server.hpp.
|
private |
Definition at line 156 of file cmd_server.hpp.
|
private |
Definition at line 163 of file cmd_server.hpp.
|
private |
Definition at line 139 of file cmd_server.hpp.
|
private |
Definition at line 151 of file cmd_server.hpp.
|
private |
Definition at line 152 of file cmd_server.hpp.
|
private |
Definition at line 166 of file cmd_server.hpp.
|
private |
Definition at line 157 of file cmd_server.hpp.
|
private |
Definition at line 164 of file cmd_server.hpp.
|
private |
Definition at line 154 of file cmd_server.hpp.
|
private |
Definition at line 161 of file cmd_server.hpp.
|
private |
Definition at line 150 of file cmd_server.hpp.
|
protected |
Definition at line 93 of file cmd_server.hpp.
|
private |
Definition at line 145 of file cmd_server.hpp.
|
private |
Definition at line 141 of file cmd_server.hpp.
|
private |
Definition at line 148 of file cmd_server.hpp.
|
private |
Definition at line 140 of file cmd_server.hpp.
|
private |
Definition at line 149 of file cmd_server.hpp.
|
private |
Definition at line 142 of file cmd_server.hpp.
|
private |
Definition at line 153 of file cmd_server.hpp.