11 int raw_data_size, body_data_size, base_data_size;
18 ROS_INFO(
"%s is connected", _port.c_str());
23 ROS_ERROR(
"%s is not connected", _port.c_str());
59 else raw_data_.assign(_data.begin(), _data.end());
65 (std::vector<int16_t>& _ros, std::vector<int16_t>& _aero)
67 _ros.resize(
name_.size());
68 for(
size_t i = 0; i < _ros.size(); ++i){
74 (std::vector<int16_t>& _aero, std::vector<int16_t>& _ros)
77 for(
size_t i = 0; i < _aero.size(); ++i){
89 fill(send_data.begin(),send_data.end(),0x7FFF);
99 std::vector<uint16_t> data(30);
100 fill(data.begin(),data.end(),0x7FFF);
136 int8_t max_bit_size = 16;
140 (status_bit >> error_bit_t::can2_connection)&1;
143 (status_bit >> error_bit_t::can2_calibration)&1;
146 (status_bit >> error_bit_t::can2_motor_status)&1;
149 (status_bit >> error_bit_t::can2_temperature)&1;
152 (status_bit >> error_bit_t::can2_response)&1;
155 (status_bit >> error_bit_t::can2_step_out)&1;
158 (status_bit >> error_bit_t::can2_protective_stopped)&1;
161 (status_bit >> error_bit_t::can2_power)&1;
std::vector< int > aero_index_
std::vector< std::string > wheel_name_
std::vector< std::pair< int, std::string > > aero_table_
std::vector< uint16_t > getStatus(uint8_t _number)
LowerController(const std::string &_port)
void onServo(bool _value)
std::vector< uint16_t > getTemperatureVoltage(uint8_t _number)
std::vector< int16_t > actuateByPosition(uint16_t _time, int16_t *_data)
void runScript(uint8_t _number, uint16_t _script)
static const uint32_t BAUDRATE
void remapRosToAero(std::vector< int16_t > &_aero, std::vector< int16_t > &_ros)
std::string getVersion(uint8_t _number)
float getBatteryVoltage()
std::vector< int16_t > getPosition(uint8_t _number)
void runScript(uint8_t _number, uint16_t _data)
void throughCAN(uint8_t _send_no, uint8_t _command, uint8_t _data1, uint8_t _data2, uint8_t _data3, uint8_t _data4, uint8_t _data5)
bool openPort(std::string _port, unsigned int _baud_rate)
ROSCPP_DECL bool get(const std::string &key, std::string &s)
void getRobotStatus(int8_t _number)
void sendPosition(uint16_t _time, std::vector< int16_t > &_data)
struct robot_hardware::LowerController::RobotStatus robot_status_
std::vector< int > wheel_aero_index_
std::string getFirmwareVersion()
std::vector< std::string > name_
std::vector< int16_t > raw_data_
void remapAeroToRos(std::vector< int16_t > &_ros, std::vector< int16_t > &_aero)
void sendVelocity(std::vector< int16_t > &_data)
std::vector< std::pair< int, std::string > > wheel_table_
aero::controller::AeroCommand * lower_
std::vector< int16_t > actuateBySpeed(int16_t *_data)
void onServo(uint8_t _number, uint16_t _data)
std::vector< std::string > upper_name_