Open SuperrHaze opened 3 years ago
I have the same issue currently.
My current hypothesis is that the version of cartographer_ros that I am using is so old (the one distributed via the ros package repository), that it doesn't provide that functionality. For reference:
Package: ros-melodic-cartographer-ros
Version: 1.0.0-1bionic.20210505.045052
Priority: extra
Section: misc
Maintainer: The Cartographer Authors <cartographer-owners@googlegroups.com>
Installed-Size: 32,0 MB
Depends: libboost-iostreams1.65.1, libboost-system1.65.1, libc6 (>= 2.27), libcairo2 (>= 1.6.0), libceres1, libgcc1 (>= 1:3.0), libgflags2.2, libgoogle-glog0v5, liblua5.2-0, libpcl-common1.8, libprotobuf10, libstdc++6 (>= 6), liburdfdom-world, libgflags-dev, libgoogle-glog-dev, libpcl-dev, ros-melodic-cartographer (>= 1.0.0), ros-melodic-cartographer-ros-msgs (>= 1.0.0), ros-melodic-eigen-conversions, ros-melodic-geometry-msgs, ros-melodic-message-runtime, ros-melodic-nav-msgs, ros-melodic-pcl-conversions, ros-melodic-robot-state-publisher, ros-melodic-rosbag, ros-melodic-roscpp, ros-melodic-roslaunch, ros-melodic-roslib, ros-melodic-sensor-msgs, ros-melodic-std-msgs, ros-melodic-tf2, ros-melodic-tf2-eigen, ros-melodic-tf2-ros, ros-melodic-urdf, ros-melodic-visualization-msgs
Homepage: https://github.com/googlecartographer/cartographer_ros
Download-Size: 4.014 kB
APT-Manual-Installed: yes
APT-Sources: http://packages.ros.org/ros/ubuntu bionic/main amd64 Packages
Description: Cartographer is a system that provides real-time simultaneous localization and mapping (SLAM) in 2D and 3D across multiple platforms and sensor configurations.
This package provides Cartographer's ROS integration.
When I try to set the parameters publish_to_tf
and publish_tracked_pose
it seems it gives an error message as if it doesn't recognize those parameters.
F0914 10:35:11.254232 14788 lua_parameter_dictionary.cc:410] Check failed: 1 == reference_counts_.count(key) (1 vs. 0) Key 'publish_to_tf' was used the wrong number of times.
[FATAL] [1631608511.254476873]: F0914 10:35:11.000000 14788 lua_parameter_dictionary.cc:410] Check failed: 1 == reference_counts_.count(key) (1 vs. 0) Key 'publish_to_tf' was used the wrong number of times.
*** Check failure stack trace: ***
@ 0x7f9e426250cd google::LogMessage::Fail()
@ 0x7f9e42626f33 google::LogMessage::SendToLog()
@ 0x7f9e42624c28 google::LogMessage::Flush()
@ 0x7f9e42627999 google::LogMessageFatal::~LogMessageFatal()
@ 0x55bed4f4afe9 (unknown)
@ 0x55bed4f4b18d (unknown)
@ 0x55bed4f34495 (unknown)
@ 0x55bed4f07131 (unknown)
@ 0x55bed4f054b4 (unknown)
@ 0x7f9e3f572bf7 __libc_start_main
@ 0x55bed4f06e0a (unknown)
[cartographer_node-2] process has died [pid 14788, exit code -6, cmd /opt/ros/melodic/lib/cartographer_ros/cartographer_node ...
I'll try to use a newer version and see how it goes.
Otherwise the mapping seems to work quite well.
After doing some more research I found a configuration where it would publish the transforms.
I let my odometry source broadcast the odometry transform (instead of just providing the topic) and adjusted the lua config basically to what you have too:
...
map_frame = "map",
tracking_frame = "imu_frame",
published_frame = "odom",
odom_frame = "odom",
provide_odom_frame = false,
...
Now it provides the transform between map and odom, the odometry source provides base_link to odom, and so I have the tree I always wanted.
Not sure if this was actually "the same issue" in the end.
this will help
sudo apt install ros-humble-gazebo-ros
sudo apt-get install ros-humble-gazebo-msgs
sudo apt-get install ros-humble-gazebo-plugins
General discription: Cartographer succeed to publish topic /map and submaps are shown in rviz, however, the Fixed Frame [map] does not exist, and the tf transform map->odom doesn't exit either.I use robot_localization to publish /odom. RVIZ: lua file:
tf_tree: rqt_graph: rostopic list: cartographer terminal: launch file:
Thank you for any suggestions!