Initial commit
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
#include "ros/ros.h"
|
||||
#include "can_msgs/Frame.h"
|
||||
#include "sensor_msgs/BatteryState.h"
|
||||
|
||||
#define __APP_NAME__ "bms_driver"
|
||||
|
||||
#ifndef BMS_DRIVER_CORE_H
|
||||
#define BMS_DRIVER_CORE_H
|
||||
|
||||
class BmsDriver{
|
||||
public:
|
||||
BmsDriver();
|
||||
~BmsDriver();
|
||||
void run();
|
||||
|
||||
private:
|
||||
ros::NodeHandle nh_;
|
||||
ros::NodeHandle private_nh_;
|
||||
ros::Timer timer_;
|
||||
|
||||
private:
|
||||
std::string input_bms_canframe_topic_;
|
||||
std::string output_bms_canframe_topic_;
|
||||
std::string output_battery_state_topic_;
|
||||
|
||||
private:
|
||||
sensor_msgs::BatteryState battery_state_;
|
||||
|
||||
private:
|
||||
ros::Subscriber can_bms_frame_sub_;
|
||||
ros::Publisher battery_status_pub_;
|
||||
ros::Publisher sent_bms_canframe_pub_;
|
||||
|
||||
private:
|
||||
void can_frame_callback(const can_msgs::Frame::ConstPtr& msg);
|
||||
void process(const ros::TimerEvent &e);
|
||||
};
|
||||
#endif
|
||||
Reference in New Issue
Block a user