Final challenge to get K4A working with rtabmap_ROS

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Final challenge to get K4A working with rtabmap_ROS

Eric Schleicher
Working to get the k4a working with ROS (18.04/melodic).

k4a SDK installed correctly/working  (viewer and recorder work very well)
rtabmap compiles from master without error
rtabmap_ros package compiles (from master) just fine
azure_kinect_ros_driver package compiles without error (https://github.com/microsoft/Azure_Kinect_ROS_Driver)

when running a slightly modified slam_rtabmap launch file (included in the gist)
everything *except* rtabmap seems to run fine.

when the process starts, the kinect ros driver comes up and publishes, rtabmapviz opens , I can see that feature points are being extracted from the feeds and odometry is being generated, but no persistent map is being created.

in reviewing output, it's very clear that rtabmap is starting...  and the immediately crashing as it start to receive data (see gist link below)
https://gist.github.com/eric-schleicher/69538bcfdbe2e3286cf7d9ef88b174d1#file-output-txt-L370

Feel like at the edge of something really great (RTABMAP+K4A)!

I hope we can find what's in the way
Reply | Threaded
Open this post in threaded view
|

Re: Final challenge to get K4A working with rtabmap_ROS

Eric Schleicher
Update:

on the same system where the k4a sdk is installed on 18.04.   i also have libfreenect2 for the kinect2 camera.  

Attempting to run rtabmap standalone with the kinect produces an error which occurs at the same point in the capture cycle as OP crash with rtabmap_ros using the k4a (which is as soon as rtabmap starts getting data)

I rebuilt rtabmap with RelWithDebInfo and ran again with GDB to see if this isn't a specific k4a problem....  

The results are:
crash 1, implicating libjpeg-turbo
https://gist.github.com/eric-schleicher/7c2520ee1f0e850b0bdf2aa2aa19d663#file-rtabmap-gdb-output-txt-L78

curiously the reference to /home/vsts/work/1/s/extern/Azure-Kinect-Sensor-SDK/extern/libjpeg-turbo/src/jcapimin.c is for a non existent user.  but google points to this vsts a some Weird Microsoft convention that appears in k4a sdk issues (in slightly different context) https://github.com/microsoft/Azure-Kinect-Sensor-SDK/issues/501


i created a symlink to a valid matching folder for *my* user's sdk location, in the hope that it would resolve the issue.  which unfortunately, it didn't.    but the error did change

ln -s /home/rosuser/k4aSDK/extern/libjpeg-turbo /home/vsts/work/1/s/extern/Azure-Kinect-Sensor-SDK/extern/libjpeg-turbo

which produces crash 2 gdb log: https://gist.github.com/eric-schleicher/7c2520ee1f0e850b0bdf2aa2aa19d663#file-rtabmap-gdb-output-txt-L147


is this a cmake folder problem?  where rtabmap is finding the k4a sdk version?


Reply | Threaded
Open this post in threaded view
|

Re: Final challenge to get K4A working with rtabmap_ROS

matlabbe
Administrator
In reply to this post by Eric Schleicher
Hi Eric,

you may try launching rtabmap node in gdb, just add
launch-prefix="xterm -e gdb --args"
 to rtabmap node tag in launch file. Using rtabmap.launch, there is also an argument called launch_prefix for convenience.

You could also show the output of cmake log from rtabmap/build directory.

cheers,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: Final challenge to get K4A working with rtabmap_ROS

matlabbe
Administrator
You could also try with rtabmap binaries from melodic (make sure to uninstall /usr/local/lib/rtabmap* and rtabmap_ros from your catkin devel space), you don't need to rebuild rtabmap if images are coming from K4A ros package.