35 #include <sensor_msgs/LaserScan.h> 36 #include <boost/asio.hpp> 37 #include <boost/array.hpp> 50 XV11Laser(
const std::string& port, uint32_t baud_rate, uint32_t firmware, boost::asio::io_service& io);
61 void poll(sensor_msgs::LaserScan::Ptr scan);
std::string port_
The serial port the driver is attached to.
bool shutting_down_
Flag for whether the driver is supposed to be shutting down or not.
uint32_t firmware_
The firmware version to check. Currently supports two different versions: 1 and 2.
void close()
Close the driver down and prevent the polling loop from advancing.
uint32_t baud_rate_
The baud rate for the serial connection.
uint16_t rpms
RPMS derived from the rpm bytes in an XV11 packet.
boost::asio::serial_port serial_
Actual serial port object for reading/writing to the XV11 Laser Scanner.
uint16_t motor_speed_
current motor speed as reported by the XV11.
XV11Laser(const std::string &port, uint32_t baud_rate, uint32_t firmware, boost::asio::io_service &io)
Constructs a new XV11Laser attached to the given serial port.
void poll(sensor_msgs::LaserScan::Ptr scan)
Poll the laser to get a new scan. Blocks until a complete new scan is received or close is called...
~XV11Laser()
Default destructor.