Open matlabbe opened 9 years ago
i follow this tutorial and get a log file:
can not access memory at address 0x0
Do every nodes (rtabmap, rgbd_odometry, rtabmapviz) produce this error? Is there a line where it crashes in the code? Can you show the full log for each node?
A fast search on Google for this error and this what I've found so far. It seems related to some modifications of the argc and argv variables (memory stack of the application corrupted). It seems happening on 32 bits architecture and on specific gcc version. Are you 32bits or 64bits? Which gcc version do you have (gcc --version
)?
I did all of step A, but get this error:
[rgbd_mapping.launch] is neither a launch file in package [rtabmap_ros] nor is [rtabmap_ros] a launch file name The traceback for the exception was written to the log file
Make sure you source the setup.bash
in your catkin_ws/devel
folder:
http://answers.ros.org/question/143496/roslaunch-is-neither-a-launch-file-in-package-nor-is-a-launch-file-name/
What if the node doesn't crash on startup but crashes after some time on ROS Indigo?
@KamalDSOberoi What is the crash error?
@willdzeng There is no error. It just says that the process has died. In my case map_optimizer crashes/dies frequently but not on startup. It executes for sometime and then it dies.
Fixed it by sourcing the setup file in the catkin_ws. Thanks!
@KamalDSOberoi
Are you using a modified version of map_optimizer
node?
@matlabbe I think no. Did you make significant changes?
I just made a simple test launch file test_map_optimizer.launch for map_optimizer node. I cannot reproduce the crash. This error can appear on start though when the camera stands still:
[ERROR] [1470151850.812122935]: map_optimizer: Poses=2 and edges=0 (poses must not be null if there are edges, and edges must be null if poses <= 1)
But disappear when the camera starts moving.
sudo apt-get install xterm gdb
ros2 launch rtabmap_ros rtabmap.launch.py \
rtabmap_args:="-d --udebug" \
launch_prefix:="xterm -e gdb -ex run --args"
Or if you use a Node configuration in your launch file:
Node(
package='rtabmap_ros', executable='rtabmap', output="screen",
arguments="-d --udebug",
prefix="xterm -e gdb -ex run --args",
...
)
This post is about ROS1. For ROS2, see this post below https://github.com/introlab/rtabmap_ros/issues/28#issuecomment-1336292967
A : Launch in GDB
Before continuing, make sure
xterm
andgdb
are installed:Before rebuilding source or in Debug mode (B,C), launch the crashing node in gdb.
If you are using
rtabmap.launch
:If using
rtabmap
orrgbd_odometry
nodes directly in your launch file, we can add thelaunch-prefix
like that:When the node crashes, type
bt
(backtrace). If the log contains Eigen stuff, see this comment about-march=native
compilation flag problem.B : Build from source
If you are using the binaries (e.g., ros-indigo-rtabmap and ros-indigo-rtabmap-ros):
Uninstall them:
rtabmap
andrtabmap_ros
from source following this instructions.Launch
rgbd_mapping.launch
If the nodes are still crashing, go to B.
C : Build in Debug mode
If A doesn't work, clean up your catkin workspace and build rtabmap in Debug mode:
Remove the binaries:
Clean your catkin workspace (assuming your catkin workspace is
~/catkin_ws
, just keepsrc
folder):Build
rtabmap
in debug mode (should not be cloned in catkin workspace):Build
rtabmap_ros
in debug mode:Source your
setup.bash
Launch
rgbd_mapping.launch
Now, if rtabmap is still crashing, start the launch file with gdb to track down where it is crashing (make sure you have the latest version of rgbd_mapping.launch with
launch_prefix
argument):When an error comes up, you can use
backtrace
(or simplybt
) command in gdb to show more info.