Skip to content

Commit

Permalink
Fixing ROS launch system (#8)
Browse files Browse the repository at this point in the history
* We didnt have proper flagging in the online node

* Clean launch common args

* Fix formatting python
  • Loading branch information
tizianoGuadagnino authored Oct 16, 2024
1 parent 90c535d commit d898b7c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
7 changes: 1 addition & 6 deletions ros/launch/common_args.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,9 @@ def generate_launch_description():
),
DeclareLaunchArgument(
"visualize",
default_value="true",
default_value="false",
description="",
choices=["true", "false"],
),
DeclareLaunchArgument(
"bag_filenames",
default_value="",
description="Comma-separated list of file paths",
),
]
)
18 changes: 12 additions & 6 deletions ros/launch/online_node.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch.conditions import IfCondition
from launch.launch_description_sources import (
get_launch_description_from_python_launch_file,
)
Expand Down Expand Up @@ -50,10 +51,15 @@ def generate_launch_description():
},
],
)

return LaunchDescription(
[
common_launch_args,
kinematic_icp_online_node,
]
rviz_node = Node(
package="rviz2",
executable="rviz2",
output="screen",
arguments=[
"-d",
get_package_share_directory("kinematic_icp") + "/rviz/kinematic_icp.rviz",
],
condition=IfCondition(LaunchConfiguration("visualize")),
)

return LaunchDescription([common_launch_args, kinematic_icp_online_node, rviz_node])

0 comments on commit d898b7c

Please sign in to comment.