8 int raw_data_size, body_data_size, base_data_size;
14 ROS_INFO(
"%s is connected", _port.c_str());
19 ROS_ERROR(
"%s is not connected", _port.c_str());
49 else raw_data_.assign(_data.begin(), _data.end());
55 (std::vector<int16_t>& _ros, std::vector<int16_t>& _aero)
57 _ros.resize(
name_.size());
58 for(
size_t i = 0; i < _ros.size(); ++i){
65 (std::vector<int16_t>& _aero, std::vector<int16_t>& _ros)
68 for(
size_t i = 0; i < _aero.size(); ++i){
95 int8_t max_bit_size = 16;
99 (status_bit >> error_bit_t::can2_connection)&1;
102 (status_bit >> error_bit_t::can2_calibration)&1;
105 (status_bit >> error_bit_t::can2_motor_status)&1;
108 (status_bit >> error_bit_t::can2_temperature)&1;
111 (status_bit >> error_bit_t::can2_response)&1;
114 (status_bit >> error_bit_t::can2_step_out)&1;
117 (status_bit >> error_bit_t::can2_protective_stopped)&1;
120 (status_bit >> error_bit_t::can2_power)&1;
std::vector< std::pair< int, std::string > > aero_table_
UpperController(const std::string &_port)
std::vector< int16_t > actuateByPosition(uint16_t _time, int16_t *_data)
std::string getVersion(uint8_t _number)
std::vector< int16_t > getPosition(uint8_t _number)
void runScript(uint8_t _number, uint16_t _data)
std::string getFirmwareVersion()
std::vector< int16_t > raw_data_
bool openPort(std::string _port, unsigned int _baud_rate)
ROSCPP_DECL bool get(const std::string &key, std::string &s)
static const uint32_t BAUDRATE
void setCurrent(uint8_t _number, uint8_t _max, uint8_t _down)
struct robot_hardware::UpperController::RobotStatus robot_status_
aero::controller::AeroCommand * upper_
void setCurrent(uint8_t _number, uint8_t _max, uint8_t _down)
void runScript(uint8_t _number, uint16_t _script)
void remapAeroToRos(std::vector< int16_t > &_ros, std::vector< int16_t > &_aero)
void remapRosToAero(std::vector< int16_t > &_aero, std::vector< int16_t > &_ros)
std::vector< std::string > name_
void sendPosition(uint16_t _time, std::vector< int16_t > &_data)
std::vector< int > aero_index_