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

Revision history [back]

click to hide/show revision 1
initial version

If I read your question correctly you want to have three laser scans, one for the top, middle and bottom of the image? If so I'd suggest updating the package so that

void convert(const sensor_msgs::ImageConstPtr& depth_msg, const image_geometry::PinholeCameraModel& cam_model, const sensor_msgs::LaserScanPtr& scan_msg, const int& scan_height, int& imageOffset)

takes a new parameter - imageOffset or something which would be used to shift the horzontal center.

Then start three different depthimage_to_laser scan nodes, mapping the output to say /scan_top, /scan_middle and /scan_bottom where the imageOffset parameter is shifted to the 1/3 area of which ever bit you want.

Of course you could further extend the process to publish these topics diectly - but if the above is what you're looking for it'll give you a starting point

Cheers

Mark

If I read your question correctly you want to have three laser scans, one for the top, middle and bottom of the image? If so I'd suggest updating the package so that

void convert(const sensor_msgs::ImageConstPtr& depth_msg, const image_geometry::PinholeCameraModel& cam_model, const sensor_msgs::LaserScanPtr& scan_msg, const int& scan_height, int& imageOffset)

takes a new parameter - imageOffset or something which would be used to shift the horzontal center.

Details on the Image can be found here http://docs.pointclouds.org/1.5.1/structsensor__msgs_1_1_image.html

Then start three different depthimage_to_laser scan nodes, mapping the output to say /scan_top, /scan_middle and /scan_bottom where the imageOffset parameter is shifted to the 1/3 area of which ever bit you want.

Of course you could further extend the process to publish these topics diectly - but if the above is what you're looking for it'll give you a starting point

Cheers

Mark