41 #include <can_msgs/Frame.h> 43 #include <dataspeed_pds_msgs/Mode.h> 44 #include <dataspeed_pds_msgs/Relay.h> 45 #include <dataspeed_pds_msgs/Script.h> 46 #include <dataspeed_pds_msgs/Status.h> 73 void recvCAN(
const can_msgs::Frame::ConstPtr& msg);
74 void recvRelay(
const dataspeed_pds_msgs::Relay::ConstPtr &msg);
75 void recvMode(
const dataspeed_pds_msgs::Mode::ConstPtr &msg);
76 void recvScript(
const dataspeed_pds_msgs::Script::ConstPtr &msg);
79 void recvSync(
const std::vector<can_msgs::Frame::ConstPtr> &msgs,
UnitId id);
84 float bytesToCelsius(int8_t input) {
return input * (float)0.5 + (
float)44.0; }
109 typedef dataspeed_pds_msgs::Status::ConstPtr
SyncPtr;
120 void recvSyncSlave1(
const SyncPtr& master,
const SyncPtr& slave1);
121 void recvSyncSlave2(
const SyncPtr& master,
const SyncPtr& slave1,
const SyncPtr& slave2);
122 void recvSyncSlave3(
const SyncPtr& master,
const SyncPtr& slave1,
const SyncPtr& slave2,
const SyncPtr& slave3);
127 #endif // _PDS_NODE_H_ dataspeed_pds_msgs::Status SyncMsg
void recvSync(const std::vector< can_msgs::Frame::ConstPtr > &msgs, UnitId id)
message_filters::Synchronizer< SyncPolicy3 > * sync_ros_slave3_
void recvMode(const dataspeed_pds_msgs::Mode::ConstPtr &msg)
message_filters::Synchronizer< SyncPolicy2 > * sync_ros_slave2_
float bytesToVoltage(uint16_t input)
dataspeed_pds_msgs::Status::ConstPtr SyncPtr
message_filters::PassThrough< SyncMsg > sync_msg_master_
message_filters::PassThrough< SyncMsg > sync_msg_slave1_
message_filters::PassThrough< SyncMsg > sync_msg_slave3_
message_filters::PassThrough< SyncMsg > sync_msg_slave2_
dataspeed_can_msg_filters::ApproximateTime sync_can_slave1_
void recvSyncSlave3(const SyncPtr &master, const SyncPtr &slave1, const SyncPtr &slave2, const SyncPtr &slave3)
message_filters::sync_policies::ApproximateTime< SyncMsg, SyncMsg > SyncPolicy1
ros::Subscriber sub_relay_
dataspeed_can_msg_filters::ApproximateTime sync_can_slave2_
void recvRelay(const dataspeed_pds_msgs::Relay::ConstPtr &msg)
void recvCAN(const can_msgs::Frame::ConstPtr &msg)
void recvScript(const dataspeed_pds_msgs::Script::ConstPtr &msg)
dataspeed_can_msg_filters::ApproximateTime sync_can_master_
const ros::Duration TIMEOUT(0.5)
PdsNode(ros::NodeHandle &node, ros::NodeHandle &priv_nh)
float bytesToAmperes(int16_t input)
float bytesToCelsius(int8_t input)
ros::Subscriber sub_script_
dataspeed_can_msg_filters::ApproximateTime sync_can_slave3_
ros::Publisher pub_status_
message_filters::sync_policies::ApproximateTime< SyncMsg, SyncMsg, SyncMsg, SyncMsg > SyncPolicy3
message_filters::Synchronizer< SyncPolicy1 > * sync_ros_slave1_
message_filters::sync_policies::ApproximateTime< SyncMsg, SyncMsg, SyncMsg > SyncPolicy2
void recvSyncSlave2(const SyncPtr &master, const SyncPtr &slave1, const SyncPtr &slave2)
void recvSyncSlave1(const SyncPtr &master, const SyncPtr &slave1)
ros::Subscriber sub_mode_