15 #include <std_msgs/String.h> 18 #include <sensor_msgs/LaserScan.h> 19 #include <sensor_msgs/Range.h> 57 memset(
buf, 0,
sizeof(
buf));
62 NODELET_INFO_STREAM(
"Cht10Func initialised. Spinning up update thread ... [" << name <<
"]");
67 return (
double)data/scale;
75 sensor_msgs::Range range_msg;
76 range_msg.field_of_view = 0.05235988;
77 range_msg.max_range = 10.0;
78 range_msg.min_range = 0.05;
79 range_msg.header.frame_id =
frame_id;
80 range_msg.radiation_type = sensor_msgs::Range::INFRARED;
81 if(nodes > range_msg.max_range){
82 final_range = std::numeric_limits<float>::infinity();
83 }
else if(nodes < range_msg.min_range){
84 final_range = -std::numeric_limits<float>::infinity();
88 range_msg.header.stamp = start;
90 range_msg.range = final_range;
98 for(
int i = 0; i <
len; i++){
110 for(
int count = 0; count < 4; count++){
134 memset(
buf, 0,
sizeof(
buf));
#define NODELET_INFO_STREAM(...)
const std::string & getUnresolvedNamespace() const
PLUGINLIB_EXPORT_CLASS(cht10_seiral_func::Cht10Func, nodelet::Nodelet)
void publish(const boost::shared_ptr< M > &message) const
int UART0_Recv(int fd, char *rcv_buf, int data_len)
ros::NodeHandle & getPrivateNodeHandle() const
void publish_scan(ros::Publisher *pub, double nodes, ros::Time start, std::string frame_id)
ecl::Thread update_thread_
std::string serialNumber_
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
#define NODELET_DEBUG_STREAM(...)
double data_to_meters(int &data, int scale)
int UART0_Init(int fd, int speed, int flow_ctrl, int databits, int stopbits, int parity)
#define ROS_INFO_STREAM(args)
bool getParam(const std::string &key, std::string &s) const
ros::Time start_scan_time
#define ROS_ERROR_STREAM(args)