ROS Kinetic Kame下fiducial_slam实现ArUco标记建图及参数咨询
fiducial_slam create a persistent ArUco marker map for RVIZ in ROS Kinetic? Absolutely! The fiducial_slam package does support persistent mapping of ArUco markers in ROS Kinetic, which lets you keep visualizing markers in RVIZ even after the camera moves away or stops detecting them. This is exactly the functionality you're looking for, as a replacement for the outdated aruco_mapping package.
Here's a step-by-step guide to configure it:
1. Core Parameter Configuration
You'll need to adjust key parameters in fiducial_slam to enable map saving, loading, and persistent TF/marker publishing. You can set these in your launch file or via the parameter server:
publish_tf: Set totrueto publish TF transforms for each detected marker relative to the globalmapframe. This ensures RVIZ can track marker positions even when the camera isn't viewing them.map_frame: Keep this as the defaultmap(match it to RVIZ's fixed frame later).save_map: Set totrueto automatically save the marker map to a file when the node shuts down.load_map: Set totrueto load the saved map on node startup—this lets you visualize markers without re-detecting them.map_file(optional): Specify a custom path for your map file (e.g., in your package'smapsdirectory) instead of the default~/.ros/fiducial_map.yaml.
Example launch file snippet:
<launch> <!-- Your camera and fiducial_detector nodes here --> <node name="fiducial_slam" pkg="fiducial_slam" type="fiducial_slam" output="screen"> <param name="publish_tf" value="true" /> <param name="map_frame" value="map" /> <param name="save_map" value="true" /> <param name="load_map" value="true" /> <param name="map_file" value="$(find your_custom_package)/maps/my_fiducial_map.yaml" /> </node> </launch>
2. RVIZ Setup for Persistent Visualization
Configure RVIZ to display the saved markers:
- Set the Fixed Frame to
map(matches themap_frameinfiducial_slam). - Add visualization components:
- Marker Display: Subscribe to the
fiducial_slam/fiducial_markerstopic—this publishes 3D models of all markers in the map, even when they're not in the camera's field of view. - TF Display: Enable the TF tree and check the boxes for marker frames (e.g.,
fiducial_0,fiducial_1). You can add an Axes or Marker child to these frames to visualize their pose clearly.
- Marker Display: Subscribe to the
3. Verify the Functionality
- Launch your camera,
fiducial_detector, andfiducial_slamnodes. - Move the camera to detect several ArUco markers—you'll see them appear in RVIZ.
- Move the camera away so the markers are no longer visible: RVIZ will still show their positions, thanks to the persistent map data.
- Shut down all nodes and restart them:
fiducial_slamwill load the saved map, and the markers will immediately appear in RVIZ without needing to re-detect them.
A quick note: Unlike aruco_mapping, fiducial_slam is actively maintained for ROS Kinetic and integrates smoothly with other ROS SLAM tools if you expand your setup later.
内容的提问来源于stack exchange,提问作者Micha90

