fast Hokuyo laser scan data with ROS
Posted: 23 Mar 2020, 17:33
Hi
I'm trying to send the laser scan data from Hokuyo_URG_04LX on CoppeliaSim to ROS but so far I can't figure out how to make it work correctly.
I could send the transform from laser_frame to world_frame and tested to see it works correctly on rviz.
I created a topic with message, sensor_msgs/LaserScan and packed the sensor informations and data for sending to ROS. But when I view it on Rviz, it appears to be incorrect.
CoppeliaSim image: https://drive.google.com/file/d/1Eu_idq ... sp=sharing
Rviz image: https://drive.google.com/file/d/1ZnWAN9 ... sp=sharing
I think maybe I incorrectly assigned the values to the LaserScan message, although, I have tried many values and searched everywhere without success.
Here is my message,
Please give me some recommendations
Thanks a lot!
I'm trying to send the laser scan data from Hokuyo_URG_04LX on CoppeliaSim to ROS but so far I can't figure out how to make it work correctly.
I could send the transform from laser_frame to world_frame and tested to see it works correctly on rviz.
I created a topic with message, sensor_msgs/LaserScan and packed the sensor informations and data for sending to ROS. But when I view it on Rviz, it appears to be incorrect.
CoppeliaSim image: https://drive.google.com/file/d/1Eu_idq ... sp=sharing
Rviz image: https://drive.google.com/file/d/1ZnWAN9 ... sp=sharing
I think maybe I incorrectly assigned the values to the LaserScan message, although, I have tried many values and searched everywhere without success.
Here is my message,
Code: Select all
function sendLaserData(data)
local laserDat
local intensity={10}
laserDat={
header=
{
stamp=simROS.getTime(),
frame_id="fastHokuyo"
},
angle_min=(-50*(math.pi/180)),
angle_max=(50*(math.pi/180)),
angle_increment=(0.1428*(math.pi/180)),
time_increment=0.5,
range_min=0.1,
range_max=5,
ranges=data,
intensities=intensity
}
simROS.publish(pub, laserDat)
end
Thanks a lot!