OS: Windows 10
Coppelia Sim Edu, Version 4.1.0. (rev. 1) 64 bits (serialization version 22)
Qt Version 5.15.0, MSVC2019
Hi, I have been trying to use this plugin, but whenever I use method simGridMap.updateMapLaser(laserScan, pose) CoppeliaSim crashes.
The map windows is correctly created in black, but whenever I want to update the map, it crashes. I have also tried to update with dummy error like simGridMap.updateMapLaser({0,1}, {})
There is no error message shown. Only if I run from a console the error that appears is Segmentation Fault
I'm following the instructions of the following youtube video
I'm using the Pioneer robot given in the CoppeliaSim library, I have only modify the sensors. They were ultrasonic and I changed them to be laser ones so I could use the updateMapLaser method.
I leave here some code for giving more context
`
function sysCall_init()
usensors={-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1}
for i=1,16,1 do
usensors[i]=sim.getObjectHandle("Pioneer_p3dx_ultrasonicSensor"..i)
end
motorLeft=sim.getObjectHandle("Pioneer_p3dx_leftMotor")
motorRight=sim.getObjectHandle("Pioneer_p3dx_rightMotor")
wheel_radius=0.975e-01
b = 0.1655
`
function sysCall_sensing()
odometry=sim.getObjectHandle('odometry')
position=sim.getObjectPosition(odometry,-1)
orientation=sim.getObjectOrientation(odometry,-1)
pose={position[1],position[2], orientation[3]}
pose=updateOdometry(pose)
for i=1,16,1 do
result,distance, detected_point=sim.readProximitySensor(usensors[i])
position=sim.getObjectPosition(usensors[i],-1)
orientation=sim.getObjectOrientation(usensors[i],-1)
pose={position[1],position[2], orientation[3]}
if(detected_point ~= nil) then
laserScan = {detected_point[3],0}
print("Punto", pose, laserScan)
simGridMap.updateMapLaser(laserScan, pose)
end
end
OS: Windows 10 Coppelia Sim Edu, Version 4.1.0. (rev. 1) 64 bits (serialization version 22) Qt Version 5.15.0, MSVC2019
Hi, I have been trying to use this plugin, but whenever I use method
simGridMap.updateMapLaser(laserScan, pose)
CoppeliaSim crashes.The map windows is correctly created in black, but whenever I want to update the map, it crashes. I have also tried to update with dummy error like
simGridMap.updateMapLaser({0,1}, {})
There is no error message shown. Only if I run from a console the error that appears is
Segmentation Fault
I'm following the instructions of the following youtube video I'm using the Pioneer robot given in the CoppeliaSim library, I have only modify the sensors. They were ultrasonic and I changed them to be laser ones so I could use the updateMapLaser method.
I leave here some code for giving more context
` function sysCall_init() usensors={-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1} for i=1,16,1 do usensors[i]=sim.getObjectHandle("Pioneer_p3dx_ultrasonicSensor"..i) end motorLeft=sim.getObjectHandle("Pioneer_p3dx_leftMotor") motorRight=sim.getObjectHandle("Pioneer_p3dx_rightMotor") wheel_radius=0.975e-01 b = 0.1655
end`
` function sysCall_sensing() odometry=sim.getObjectHandle('odometry') position=sim.getObjectPosition(odometry,-1) orientation=sim.getObjectOrientation(odometry,-1) pose={position[1],position[2], orientation[3]} pose=updateOdometry(pose)
end`
Thanks and Regards