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

Revision history [back]

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-mpu9250-node, 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-hc-sr04-node)

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.