Cartographer Localization only mode

asked 2023-01-17 03:55:25 -0500

daidalos99 gravatar image

Hi. I'm having problems when using cartographer_ros.

  1. I have saved the map(pgm, yaml) and want to run localization only mode with the saved map. I referenced the cartographer_ros tutorial pagelink text and tried to follow it, but I cannot get the sentence of "This is enabled by running cartographer_node with a -load_state_filename argument ". I think it means to change the cartographer_node in my launch file by putting args (-load_state_filename). But I'm not sure clearly, so does anybody knows about this pls let me know. I don't know how should I add args(is there any fixed format or something?).

for instance, my rplidar_2d.launch is like below.

<?xml version="1.0"?>
   <launch>
      <param name="/use_sim_time" value="false" />
      <node name="cartographer_node"
            pkg="cartographer_ros"
            type="cartographer_node"
            args="-configuration_directory $(find cartographer_ros)/configuration_files -configuration_basename rplidar.lua -load_state_filename $(find cartographer_ros)/cconfiguration_files/map/map.pgm"
        output="screen">
      </node>
      <node pkg="tf" type="static_transform_publisher" name="base_to_laser_broadcaster" args="0 0 0 0 0 0 base_link laser 100" />
      <node name="rviz" pkg="rviz" type="rviz" required="true" args="-d $(find cartographer_ros)/configuration_files/demo_2d.rviz" />
   </launch>

2 . I made a directory name cartographer_ws for cartographer_ros to avoid the confliction of catkin_make_isolated. But some reason, after I change my .launch file or other files, it is only reflected when I delete install_isolated, devel_isolated and source setup.bash and catkin_make_isolated --use-ninja. I don;t know why this happeing(On catkin_ws folder when I change launch file, it just reflected when I just roslaunch.).

Really need help... It would be greatful!

edit retag flag offensive close merge delete

Comments

have you ever try cartographer slam? if not try the slam mode first.

i do have experience trying install cartographer in different workspace hopefully the "install isolated" not affecting the catkin_ws but i face many problem that even im forget now. finally all my package are compiled with cartographer using "catkin_make_isolated bla bla bla"

frans gravatar image frans  ( 2023-01-24 08:21:19 -0500 )edit