Skip to content

Spiraline/GNSS-mapping

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GNSS mapping

Make points map with GNSS

Usage

[Requirement]

  • ROS
  • setup.bash in ROS should be already sourced (ex: source /opt/ros/melodic/setup.bash)

[Input topic]

  • pointcloud (sensor_msgs::PointCloud2 type)
  • gnss (geometry_msgs::PoseStamped type)

Input topic can be given by playing rosbag or by publishing a topic in real time in simulator. The topic name can be set through the launch file.

[Execution]

git clone https://github.com/Spiraline/GNSS-mapping.git
cd GNSS-mapping
catkin_make
source devel/setup.bash
roslaunch launch/gnss_mapping.launch

[Parameter]

  • gnss_topic: gnss topic name
  • points_topic: points topic name
  • map_topic: map topic name
  • voxel_leaf_size: Points is merged after filtering the points data once through the voxel grid filter. voxel leaf size is the degree of filtering. If it is 0.0, no filtering is performed at all, and the larger the value, the more filtering is performed.
  • min_scan_range, max_scan_range: Use points data only within this range
  • use_ndt: A flag indicating whether to use the NDT algorithm. I do not recommend using it.
  • use_gnss_ori: A flag indicating whether to use orientation in GNSS topic. I recommend to use when orientation is accurate.
  • min_add_scan_shift: After this value is posed from the previously merged points, the next points are merged into the map.
  • output_path: output pcd file path
  • tf_XX: If the position or direction between GNSS and LiDAR is different, it must be entered in tf.

[How to save points_map into pcd file]

rosparam set save_map $(voxel leaf size)

Before saving the map, it filters data again with the voxel grid filter.

Example

We provide rosbag example for CubeTown map in SVL Simulator. We prepared a rosbag in which the LiDAR's position was misaligned just like the actual driving situation. Offset is as follows.

  • x: 5 (m)
  • y: -3 (m)
  • yaw: 45 (deg)
example
  1. Configure parameters in launch/gnss_mapping.launch

    <!-- TF from gnss to localizer (LiDAR) -->
        <arg name="tf_x" default="5.0" />
        <arg name="tf_y" default="-3.0" />
        <arg name="tf_z" default="0.0" />
        <arg name="tf_roll" default="0.0" />
        <arg name="tf_pitch" default="0.0" />
        <arg name="tf_yaw" default="-0.785" />
    

    You can configure other parameters

  2. Execute the launch file

    cd gnss_mapping
    roslaunch launch/gnss_mapping.launch
    

    You can execute roslaunch gnss_mapping gnss_mapping.launch, but in this case you should build (catkin_make) to update pararmeters.

  3. Play the rosbag. You don't need to launch roscore since roslaunch already executed it.

    cd example
    rosbag play cubetown.bag
    

    This rosbag has below two topics.

    • points_raw: LiDAR points data
    • gnss_pose: GNSS data in x, y, z, quaternion format

    You can verify gnss_pose by rostopic echo

    example
  4. (Optional) You can visualize progress in Rviz when you change fixed frame into map.

    example example
  5. Save the map

    rosparam set save_map 0.1
    

    Map is successfully saved when you see below message.

    example

About

GNSS mapping tool

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published