Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory coruption when running lsd_slam_core #1

Closed
boonflies opened this issue May 5, 2018 · 6 comments
Closed

Memory coruption when running lsd_slam_core #1

boonflies opened this issue May 5, 2018 · 6 comments

Comments

@boonflies
Copy link

boonflies commented May 5, 2018

I receive the following error, when i run,
$ rosrun lsd_slam_core live_slam image:=/ardrone/front/image_rect camera_info:=/ardrone/front/camera_info

Received ROS Camera Calibration: fx: 463.275726, fy: 535.977356, cx: 328.456696, cy: 134.693726 @ 640x360
RECEIVED ROS camera calibration!
image dimensions must be multiples of 16! Please crop your images / video accordingly.
Started mapping thread!
Started constraint search thread!
Started optimization thread
Doing Random initialization!
started image display thread!
Done Random initialization!
*** Error in `/home/dyana/ros/catkin_ws/devel/lib/lsd_slam_core/live_slam': malloc(): memory corruption: 0x0000000000cb04a0 ***
Aborted (core dumped)

Then I tried to use a calibration file, instead of camera_info,
rosrun lsd_slam_core live_slam image:=/ardrone/front/image_rect _calib:=/home/dyana/.ros/camera_info/ardrone1_default.cfg
with calibration file as follows
0.672049 0.899033 0.502065 0.513876 0.271972
640 352
none
640 352

then i received a different error,
UndistorterPTAM: input image size differs from expected input size! Not undistorting

How to solve this memory corruption error? and undistortingPTAM error?

@haochihlin
Copy link
Collaborator

@kungfrank
I think you could answer this ~

@kungfrank
Copy link
Collaborator

kungfrank commented May 7, 2018

Hello @boonflies,
Memory corruption error in lsd_slam cause by input image resolution isn't multiple-of-16. That why we modified ardrone output image resolution to 640x352(see video.h in ardrone_autonomy, you should replace the same file in your ardrone_autonomy package with it ). But at the same time, don't forget to modify parameter of resolution in camera calibration file too(that is similar to ardrone_front.yaml, which is ardrone's default camera calibration file).

@boonflies
Copy link
Author

Thanks.
When I used the raw image and made the camera configuration file as,
640 360
Crop
640 320
the error got resolved.

Does it make a difference in slam, to set the image size to 640x320 rather than 640x352 which is the drone's output image resolution?

@haochihlin
Copy link
Collaborator

Hi @boonflies
It is great to know you have solved the issue!
About the resolution, well, based on my experience, there is no performance difference.
The only thing you need to take care is to do the camera calibration after modifying the image size!

@axelfar
Copy link
Contributor

axelfar commented May 15, 2018

Hi @boonflies,
I have a quesiton about your camera calibration.
Do you have a good result with lsd_slam and your calibration file?
For me the resulting pointcloud is really bad.
I try to calibrate my drone with 'camera_calibration' it's better but i have a flat pointcloud.

@boonflies
Copy link
Author

I did not properly calibrate the camera, but I just got some calibration file from net. I am using this calibration file,
0.50355332 0.894045767 0.494061013 0.509863 -0.466013 0.176685 0.032364 -0.010129 0.000000
640 360
crop
400 288

I have not visualized the point cloud in RViz yet. I can only see it in lsd_slam's point cloud viewer.

Is it right, that we get point cloud when we press 'l' followed by 'p' on the lsd_slam's pointcloud viewer and a tmp.ply file is generated. How is the point cloud topic published and visualized in RViz?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants