ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

How To? LaserScan and Odom message for navigation

asked 2020-01-17 02:14:51 -0500

sohartma gravatar image

updated 2022-06-12 19:32:20 -0500

lucasw gravatar image

Hi there,

I'm trying to set up the navigation stack for my self built robot. It's equipped with three HC SR04 Ultrasonic Sensors and a MPU 9250/6500 for odometry data. I've read the ROS wiki: http://wiki.ros.org/navigation/Tutori... for publishing sensor streams, however i have no clue how the example nodes need to be edited to fit my sensors. I have also tried the http://wiki.ros.org/navigation/Tutori... example node, it publishes the /odom topic, but doesn't display the real data, when i move my MPU...

The rest of my setup: Ubuntu 16, ROS Kinetic, all sensors connected to a RaspberryPi 3. I also have two Arduino boards availble if that helps.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-12-24 12:11:07 -0500

ulashmetalcrush gravatar image

I don't know if there exists a simple tool that publishes odometry information directly from wheel encoders or imu data. In your scenario a quick search for your imu sensor links to : https://github.com/wolfeidau/ros-mpu9..., which might work for outputting IMU messages as outputs. If nothings work for you, read your serial output of your sensor from raspberry pi's pins or usb inputs, and convert them to ros imu message.

You can convert this imu message to odometry via a custom node or with robot localization package( a very good package for fusing many types of sensors information) you can check out the ros wiki for that http://wiki.ros.org/robot_localization.

For HC-SR04, you can connect that sensor to one of the raspberry pi3's pins. As far as I remember, HC-SR04 was providing analog output corresponding to measurements length, there might be readily available software for it(You can check arduino tutorials for it as well, mapping between analog voltage to distance will be pretty much the same. Then you can convert HC-SR04 distance information to pointcloud or laserscan(assume there is a virtual laserscanner at the centroid of those 3 hcsr04 sensors, and rays are cast from there). You have to work some trigonometry out but you can ask again when you are at that stage. At that same package and publish it as a ros message.

HC-Sr04's are common sensors, there might be rosnodes on github(https://github.com/matpalm/ros...

Sorry for the long message, I have just focused on how to solve it barebone and forgot to checkout github, but here are some repositories and ideas that can help.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-01-17 02:14:51 -0500

Seen: 443 times

Last updated: Jan 17 '20