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

Mapping from black and white images

asked 2019-02-05 05:25:42 -0500

stevemartin gravatar image

Sometimes Lidar and RGB-D cameras are not necessary for some type of environments. Imagine that the factory has a specifically designated route for robots and this route is marked with yellow lines on both sides like a road.

I was thinking to simply use a monocamera that will detect the yellow lines and using canny edge detection will convert the images into black and white images with yellow lines being white.

How can I create a map from such a sensor and images?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-02-05 10:11:57 -0500

If a few conditions can be assumed then this can certainly be done. If you can safely assume that the ground is always flat, the robot is always placed horizontally on the ground at the same height and the mono-camera is fixed on the robot body then you should be able to do this. There will be some edge cases such as someone with yellow shoes on walking infront of the robot and such like, but overall it should be okay.

Using the assumptions above, and segmenting out the yellow lines from the camera image, you can use the calibrated lens model of the camera and the assumption of a flat surface to project these yellow lines into an orthographic (top down) image of the yellow boundaries. A point cloud would actually be a useful type to use here because it could be fed into existing SLAM nodes. Also if there were long straight yellow roads then localisation using the camera alone would be impossible, so you would need to combine this with wheel odometry too.

edit flag offensive delete link more

Comments

@PeteBlackerThe3rd Okay everything you mentioned is doable. So are you saying that feeding the top down black and white images to some point cloud maker + slam will produce a 2d map without interfering into costmap source code?

stevemartin gravatar image stevemartin  ( 2019-02-05 10:22:27 -0500 )edit

Yes. You can use the node pointcloud_to_laser scan to create the laser scan messages used by gmapping for example. This is not ideal because a fair amount of useful information will be thrown away by this step, but it should produce a working system to then develop further.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2019-02-05 10:33:23 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2019-02-05 05:25:42 -0500

Seen: 196 times

Last updated: Feb 05 '19