-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- bringup.launch.py -> bringup_launch.py - cloisim.launch.py -> cloisim_launch.py below two files will be deprecated. - bringup.launch.py, cloisim.launch.py
- Loading branch information
1 parent
55d7833
commit 3087710
Showing
4 changed files
with
157 additions
and
155 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
bringup_launch.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
# | ||
# LGE Advanced Robotics Laboratory | ||
# Copyright (c) 2020 LG Electronics Inc., LTD., Seoul, Korea | ||
# All Rights are Reserved. | ||
# | ||
# SPDX-License-Identifier: MIT | ||
# | ||
|
||
import os | ||
import launch.actions | ||
from launch_ros.actions import Node | ||
from launch.actions import DeclareLaunchArgument | ||
from launch.actions import SetEnvironmentVariable | ||
from launch.substitutions import LaunchConfiguration | ||
from launch_ros.parameter_descriptions import ParameterValue | ||
|
||
|
||
def generate_launch_description(): | ||
|
||
_single_mode = LaunchConfiguration('single_mode') | ||
_target_model = LaunchConfiguration('target_model') | ||
_target_parts_type = LaunchConfiguration('target_parts_type') | ||
_target_parts_name = LaunchConfiguration('target_parts_name') | ||
_scan = LaunchConfiguration('scan') | ||
_cmd_vel = LaunchConfiguration('cmd_vel') | ||
_odom = LaunchConfiguration('odom') | ||
_imu = LaunchConfiguration('imu') | ||
_navsatfix = LaunchConfiguration('navsatfix') | ||
|
||
cloisim_ros_cmd = Node( | ||
package="cloisim_ros_bringup", | ||
executable="bringup", | ||
output='screen', | ||
remappings=[('scan', _scan), | ||
('cmd_vel', _cmd_vel), | ||
('odom', _odom), | ||
('imu', _imu), | ||
('navsatfix', _navsatfix)], | ||
parameters=[{'single_mode': _single_mode, | ||
'target_model': ParameterValue(_target_model, value_type=str), | ||
'target_parts_type': ParameterValue(_target_parts_type, value_type=str), | ||
'target_parts_name': ParameterValue(_target_parts_name, value_type=str), | ||
}]) | ||
|
||
declare_launch_argument_sm = DeclareLaunchArgument( | ||
'single_mode', | ||
default_value='False', | ||
description='whether to use single mode') | ||
|
||
declare_launch_argument_tm = DeclareLaunchArgument( | ||
'target_model', | ||
default_value='', | ||
description='specify the target model you want') | ||
|
||
declare_launch_argument_tpt = DeclareLaunchArgument( | ||
'target_parts_type', | ||
default_value='', | ||
description='specify the type of target parts you want') | ||
|
||
declare_launch_argument_tpn = DeclareLaunchArgument( | ||
'target_parts_name', | ||
default_value='', | ||
description='specify the name of target parts you want') | ||
|
||
declare_launch_argument_sc = DeclareLaunchArgument( | ||
'scan', | ||
default_value='scan', | ||
description='specify scan topic you want') | ||
|
||
declare_launch_argument_cmdvel = DeclareLaunchArgument( | ||
'cmd_vel', | ||
default_value='cmd_vel', | ||
description='specify cmd_vel topic you want') | ||
|
||
declare_launch_argument_odom = DeclareLaunchArgument( | ||
'odom', | ||
default_value='odom', | ||
description='specify odom topic you want') | ||
|
||
declare_launch_argument_imu = DeclareLaunchArgument( | ||
'imu', | ||
default_value='imu', | ||
description='specify imu/data topic you want') | ||
|
||
declare_launch_argument_navsatfix = DeclareLaunchArgument( | ||
'navsatfix', | ||
default_value='navsatfix', | ||
description='specify navsatfix topic you want') | ||
|
||
stdout_log_use_stdout_envvar = SetEnvironmentVariable( | ||
'RCUTILS_LOGGING_USE_STDOUT', '1') | ||
|
||
stdout_log_buf_stream_envvar = SetEnvironmentVariable( | ||
'RCUTILS_LOGGING_BUFFERED_STREAM', '1') | ||
|
||
# Create the launch description and populate | ||
ld = launch.LaunchDescription() | ||
|
||
# Set environment variables | ||
ld.add_action(stdout_log_use_stdout_envvar) | ||
ld.add_action(stdout_log_buf_stream_envvar) | ||
ld.add_action(declare_launch_argument_sm) | ||
ld.add_action(declare_launch_argument_tm) | ||
ld.add_action(declare_launch_argument_tpt) | ||
ld.add_action(declare_launch_argument_tpn) | ||
ld.add_action(declare_launch_argument_sc) | ||
ld.add_action(declare_launch_argument_cmdvel) | ||
ld.add_action(declare_launch_argument_odom) | ||
ld.add_action(declare_launch_argument_imu) | ||
ld.add_action(declare_launch_argument_navsatfix) | ||
ld.add_action(cloisim_ros_cmd) | ||
|
||
return ld |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
cloisim_launch.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# | ||
# LGE Advanced Robotics Laboratory | ||
# Copyright (c) 2020 LG Electronics Inc., LTD., Seoul, Korea | ||
# All Rights are Reserved. | ||
# | ||
# SPDX-License-Identifier: MIT | ||
# | ||
from launch import LaunchDescription | ||
from launch.actions import DeclareLaunchArgument | ||
from launch.actions import ExecuteProcess | ||
from launch.substitutions import LaunchConfiguration | ||
|
||
|
||
def generate_launch_description() -> LaunchDescription: | ||
|
||
sim_path = LaunchConfiguration('sim_path') | ||
world = LaunchConfiguration('world') | ||
|
||
execute_multi_robot_simulator = ExecuteProcess( | ||
cmd=['./CLOiSim.x86_64', '-world', world], | ||
cwd=[sim_path], | ||
output='screen') | ||
|
||
declare_launch_argument_sim_path = DeclareLaunchArgument( | ||
'sim_path', | ||
default_value='', | ||
description='path where the CLOiSim simulator located') | ||
|
||
declare_launch_argument_world = DeclareLaunchArgument( | ||
'world', | ||
default_value='', | ||
description='It is World file name. Please check environments before run. [CLOISIM_WORLD_PATH, CLOISIM_MODEL_PATH]') | ||
|
||
# Create the launch description and populate | ||
ld = LaunchDescription() | ||
|
||
# Add the actions to launch all nodes | ||
ld.add_action(declare_launch_argument_sim_path) | ||
ld.add_action(declare_launch_argument_world) | ||
ld.add_action(execute_multi_robot_simulator) | ||
|
||
return ld |