feat(slam): add lidar SLAM and pointcloud processing packages
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
<launch>
|
||||
|
||||
<arg name="rviz" default="true" />
|
||||
|
||||
<node pkg="fast_lio" type="fastlio_mapping" name="laserMapping" output="screen" required="true" launch-prefix="gdb -ex run --args">
|
||||
<param name="imu_topic" type="string" value="/livox/imu" />
|
||||
<param name="map_file_path" type="string" value=" " />
|
||||
<param name="max_iteration" type="int" value="4" />
|
||||
<param name="dense_map_enable" type="bool" value="1" />
|
||||
<param name="fov_degree" type="double" value="75" />
|
||||
<param name="filter_size_corner" type="double" value="0.2" />
|
||||
<param name="filter_size_surf" type="double" value="0.2" />
|
||||
<param name="filter_size_map" type="double" value="0.5" />
|
||||
<param name="runtime_pos_log_enable" type="bool" value="1" />
|
||||
<param name="cube_side_length" type="double" value="2000" />
|
||||
</node>
|
||||
|
||||
<!-- <group if="$(arg rviz)">
|
||||
<node launch-prefix="nice" pkg="rviz" type="rviz" name="rviz" args="-d $(find fast_lio)/rviz_cfg/loam_livox.rviz" />
|
||||
</group> -->
|
||||
|
||||
</launch>
|
||||
@@ -0,0 +1,70 @@
|
||||
import os.path
|
||||
|
||||
from ament_index_python.packages import get_package_share_directory
|
||||
|
||||
from launch import LaunchDescription
|
||||
from launch.actions import DeclareLaunchArgument
|
||||
from launch.substitutions import LaunchConfiguration, PathJoinSubstitution
|
||||
from launch.conditions import IfCondition
|
||||
|
||||
from launch_ros.actions import Node
|
||||
|
||||
|
||||
def generate_launch_description():
|
||||
package_path = get_package_share_directory('fast_lio')
|
||||
default_config_path = os.path.join(package_path, 'config')
|
||||
default_rviz_config_path = os.path.join(
|
||||
package_path, 'rviz', 'fastlio.rviz')
|
||||
|
||||
use_sim_time = LaunchConfiguration('use_sim_time')
|
||||
config_path = LaunchConfiguration('config_path')
|
||||
config_file = LaunchConfiguration('config_file')
|
||||
rviz_use = LaunchConfiguration('rviz')
|
||||
rviz_cfg = LaunchConfiguration('rviz_cfg')
|
||||
|
||||
declare_use_sim_time_cmd = DeclareLaunchArgument(
|
||||
'use_sim_time', default_value='false',
|
||||
description='Use simulation (Gazebo) clock if true'
|
||||
)
|
||||
declare_config_path_cmd = DeclareLaunchArgument(
|
||||
'config_path', default_value=default_config_path,
|
||||
description='Yaml config file path'
|
||||
)
|
||||
decalre_config_file_cmd = DeclareLaunchArgument(
|
||||
'config_file', default_value='mid360.yaml',
|
||||
description='Config file'
|
||||
)
|
||||
declare_rviz_cmd = DeclareLaunchArgument(
|
||||
'rviz', default_value='true',
|
||||
description='Use RViz to monitor results'
|
||||
)
|
||||
declare_rviz_config_path_cmd = DeclareLaunchArgument(
|
||||
'rviz_cfg', default_value=default_rviz_config_path,
|
||||
description='RViz config file path'
|
||||
)
|
||||
|
||||
fast_lio_node = Node(
|
||||
package='fast_lio',
|
||||
executable='fastlio_mapping',
|
||||
parameters=[PathJoinSubstitution([config_path, config_file]),
|
||||
{'use_sim_time': use_sim_time}],
|
||||
output='screen'
|
||||
)
|
||||
rviz_node = Node(
|
||||
package='rviz2',
|
||||
executable='rviz2',
|
||||
arguments=['-d', rviz_cfg],
|
||||
condition=IfCondition(rviz_use)
|
||||
)
|
||||
|
||||
ld = LaunchDescription()
|
||||
ld.add_action(declare_use_sim_time_cmd)
|
||||
ld.add_action(declare_config_path_cmd)
|
||||
ld.add_action(decalre_config_file_cmd)
|
||||
ld.add_action(declare_rviz_cmd)
|
||||
ld.add_action(declare_rviz_config_path_cmd)
|
||||
|
||||
ld.add_action(fast_lio_node)
|
||||
ld.add_action(rviz_node)
|
||||
|
||||
return ld
|
||||
@@ -0,0 +1,70 @@
|
||||
import os.path
|
||||
|
||||
from ament_index_python.packages import get_package_share_directory
|
||||
|
||||
from launch import LaunchDescription
|
||||
from launch.actions import DeclareLaunchArgument
|
||||
from launch.substitutions import LaunchConfiguration, PathJoinSubstitution
|
||||
from launch.conditions import IfCondition
|
||||
|
||||
from launch_ros.actions import Node
|
||||
|
||||
|
||||
def generate_launch_description():
|
||||
package_path = get_package_share_directory('fast_lio')
|
||||
default_config_path = os.path.join(package_path, 'config')
|
||||
default_rviz_config_path = os.path.join(
|
||||
package_path, 'rviz', 'fastlio.rviz')
|
||||
|
||||
use_sim_time = LaunchConfiguration('use_sim_time')
|
||||
config_path = LaunchConfiguration('config_path')
|
||||
config_file = LaunchConfiguration('config_file')
|
||||
rviz_use = LaunchConfiguration('rviz')
|
||||
rviz_cfg = LaunchConfiguration('rviz_cfg')
|
||||
|
||||
declare_use_sim_time_cmd = DeclareLaunchArgument(
|
||||
'use_sim_time', default_value='false',
|
||||
description='Use simulation (Gazebo) clock if true'
|
||||
)
|
||||
declare_config_path_cmd = DeclareLaunchArgument(
|
||||
'config_path', default_value=default_config_path,
|
||||
description='Yaml config file path'
|
||||
)
|
||||
decalre_config_file_cmd = DeclareLaunchArgument(
|
||||
'config_file', default_value='unilidar_l2.yaml',
|
||||
description='Config file'
|
||||
)
|
||||
declare_rviz_cmd = DeclareLaunchArgument(
|
||||
'rviz', default_value='true',
|
||||
description='Use RViz to monitor results'
|
||||
)
|
||||
declare_rviz_config_path_cmd = DeclareLaunchArgument(
|
||||
'rviz_cfg', default_value=default_rviz_config_path,
|
||||
description='RViz config file path'
|
||||
)
|
||||
|
||||
fast_lio_node = Node(
|
||||
package='fast_lio',
|
||||
executable='fastlio_mapping',
|
||||
parameters=[PathJoinSubstitution([config_path, config_file]),
|
||||
{'use_sim_time': use_sim_time}],
|
||||
output='screen'
|
||||
)
|
||||
rviz_node = Node(
|
||||
package='rviz2',
|
||||
executable='rviz2',
|
||||
arguments=['-d', rviz_cfg],
|
||||
condition=IfCondition(rviz_use)
|
||||
)
|
||||
|
||||
ld = LaunchDescription()
|
||||
ld.add_action(declare_use_sim_time_cmd)
|
||||
ld.add_action(declare_config_path_cmd)
|
||||
ld.add_action(decalre_config_file_cmd)
|
||||
ld.add_action(declare_rviz_cmd)
|
||||
ld.add_action(declare_rviz_config_path_cmd)
|
||||
|
||||
ld.add_action(fast_lio_node)
|
||||
ld.add_action(rviz_node)
|
||||
|
||||
return ld
|
||||
Reference in New Issue
Block a user