Follow MaxBotix:
Ask A Question

MaxBotix Ultrasonic Sensor used in the Robot Operating System (ROS)

 

Robot Operating System (ROS)A MaxBotix ultrasonic sensor installed in a robot using the Robot Operating System (ROS) provides the valuable data needed to solve the complex obstacle avoidance and navigation problems on your autonomous robots. The Robot Operating System is a powerful resource that enables collaborative development of truly complex robot software. ROS is designed to be run on any Ubuntu device from a Raspberry Pi to a dedicated PC, learn more about how to connect a Raspberry Pi with a USB ultrasonic sensor.


For a great crash course, ROS Tutorial part 1 provides a refresher on ROS and the second video shows robots using Maxbotix ultrasonic sensors, Gentle Intro to ROS - Part 2. It also has excellent presentation slides to provide a strong intellectual foundation. Many of your more advanced questions can be answered within the ROS wiki.

Increase Productivity with the Robot Operating System

ROS integrates the numerous tasks and components operating on a robot and allows you to break down complex problems into more manageable pieces. ROS connects all messages being sent only with the programs interested in those messages. This means you can write a program without worrying about coding all the inputs and other subroutines.

The collaborative nature of the Robot Operating Systems allows you to capitalize on the shared work of the community. This lets you focus on creating only the pieces of software you need without having to reinvent the wheel.


Robot Operating System 8 Year Montage

For users looking to quickly connect an ultrasonic sensor and go, our USB sensors are a real standout. You can attach a USB sensor to your robot with a standard micro USB cable like a standard phone charging cable. At this point, it doesn’t take much more. All that is left is to write a few simple lines of code and you can fully integrate your MaxBotix sensor into your robot with ROS. Feel free to review and use the following example from the presentation slides to the linked ROS videos.


MaxBotix Ultrasonic Sensor int main( int argc, char **argv)
{

ros::init( argc, argv, "publish_sonar");
ros::NodeHandle nh;
ros::Publisher pub = nh.advertise("sonar0", 1);
sensor_msgs::Range rangeMsg;
char rxBuf[80];
float range;
int fd;
fd = open("/dev/ttyUSB0", O_EXCL);
if (fd < 0)
{

std::cerr << "Error opening sonar tty\n";
return(-1);

}
while(ros::ok())
{

// Maxbotix output is R1234, range in mm
int i = 0;
while(read(fd, &rxBuf[i], 1)) {
if (rxBuf[i] == '\r') {

rxBuf[i] = '\0';
Break;
}

I++;
}
range = strtof(&rxBuf[1], NULL) / 1000; // output in meters
rangeMsg.range = range;
rangeMsg.header.stamp = ros::Time::now();
ROS_INFO_STREAM("Sonar msg: " << std::string(rxBuf) << " range: " << range);
pub.publish(rangeMsg);

}
return(0);

}

With the flexibility of ROS and the number of packages that are already available, creating software ROS can greatly simplify the task of creating robust robot software. While creating robot software with the robot operating system lets you leverage the collective expertise of the community and produce more robust and flexible robots, being able to install an easy to use MaxBotix range finder will help you produce your robot even faster.


Easy-to-Use Ultrasonic Sensor Collection for the Robot Operating System

Check out the ultrasonic sensors below to use with the Robot Operating System. They're fast, accurate, low-cost and easy-to-use.


Ultrasonic Sensor - XL-MaxSonar-EZHigh Performance Ultrasonic Sensor - XL-MaxSonar®-EZ™. The industrial XL‑MaxSonar‑EZ sensors are high performance ultrasonic sensors with high power output, noise rejection, auto calibration, and factory calibrated beam patterns. The XL‑MaxSonar‑EZ sensors have three outputs: analog voltage, serial, & pulse width. Advanced users are encouraged to view the XL‑MaxSonar‑AE sensors which feature analog voltage, serial, & a real‑time analog envelope waveform outputs. To view all the products in the XL-MaxSonar-EZ Sensors Product line click here.


Ultrasonic Sensor - HRLV-MaxSonar-EZHigh Performance Ultrasonic Sensor - HRLV-MaxSonar-EZ. The high resolution HRLV‑MaxSonar‑EZ senors are high performance ultrasonic sensors with noise rejection, improved automatic calibration, and factory calibrated beam patterns. The HRLV‑MaxSonar‑EZ sensors have three outputs: Analog Voltage, Pulse Width, RS232 or TTL serial data. The HRLV‑MaxSonar‑EZ products are high resolution ultrasonic sensors, that provide a component module solution that offers easy to use outputs, no sensor dead zone, calibrated beam patterns, stable range readings, low power demands, and a host of other features detailed in the product datasheets. To view all the products in the HRLV-MaxSonar-EZ Sensors Product line click here.


Ultrasonic Sensor - HRUSB-MaxSonar-EZHigh Performance Ultrasonic Sensor - HRUSB-MaxSonar®-EZ™. The HRUSB-MaxSonar-EZ ultrasonic sensors feature an easy to use USB interface that connects directly to a computer with a standard Micro-B USB cable. The HRUSB‑MaxSonar‑EZ sensors detect objects in a calibrated detection zone and report when an object (such as a person) enters the detection zone. The target is released after leaving the HRUSB‑MaxSonar‑EZ detection zone. The HRUSB‑MaxSonar‑EZ ultrasonic sensor provides a component module solution that offers easy integration with USB connectivity, no sensor dead zone, calibrated beam patterns, stable range readings, and a host of other features. To view all the products in the HRUSB-MaxSonar-EZ Sensors Product line click here.


Ultrasonic Sensor - LV-MaxSonar-EZHigh Performance Ultrasonic Sensor - LV-MaxSonar®-EZ™. The original LV‑MaxSonar‑EZ products were the first low cost ultrasonic distance sensors to provide a component module solution that offered easy to use outputs, no sensor dead zone, calibrated beam patterns, stable range readings, low power demands, and a host of other features detailed in the product datasheets. As a result, our component modules have found a wide acceptance in the robotics community, and have also been integrated into a number of industrial solutions including: proximity sensors for store displays, high speed sensors for vending machines, remote monitoring sensors for parking monitors, and distance sensors used to evaluate people's height. To view all the products in the LV-MaxSonar-EZ Sensors Product line click here.


Ultrasonic Sensor - XL-MaxSonar-WRHigh Performance Ultrasonic Sensor - XL-MaxSonar®-WR™. The industrial outdoor XL‑MaxSonar‑WR sensors have a robust PVC housing designed to meet IP67 water intrusion. The sensors provide short to long distance detection and ranging with a narrow beam pattern. The XL‑MaxSonar‑WR outdoor ultrasonic sensors have high power output, noise rejection, auto calibration, and factory calibrated beam patterns. Users should select a sensor with their outputs of choice and reading filtering that matches their application. Models are available with analog voltage output, serial digital output, pulse width output (select models), & real-time analog envelope output (select models). To view all the products in the XL-MaxSonar-WR Sensors Product line click here.


Ultrasonic Sensor - HRXL‑MaxSonar‑WRHigh Performance Ultrasonic Sensor - HRXL‑MaxSonar®‑WR™. The industrial high resolution outdoor HRXL-MaxSonar-WR sensors have a robust PVC housing designed to meet IP67 water intrusion. The sensors provide short to long distance detection and ranging with a narrow beam pattern. The HRXL-MaxSonar-WR outdoor ultrasonic sensors have high power output, noise rejection, auto calibration, temperature compensation, and factory calibrated beam patterns. Users should select a sensor with their outputs of choice and that matches their application. Models are available with analog voltage output, RS232 Serial output (select models) or TTL Serial output (select models), and pulse width output. To view all the products in the HRXL-MaxSonar-WR Sensors Product line click here.




 
 
 
 
 
 
 
Signup for notification of our exciting new products and periodic new letters. We are excited to provide the latest information from MaxBotix Inc.