Skip to content

Commit

Permalink
use_sim_timeオプション追加
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuwamai committed Dec 13, 2023
1 parent b4fac91 commit 5d97674
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions sciurus17_examples/launch/object_tracking.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,20 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import launch
from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument
from launch.substitutions import LaunchConfiguration
from launch_ros.actions import ComposableNodeContainer
from launch_ros.actions import SetParameter
from launch_ros.descriptions import ComposableNode


def generate_launch_description():
declare_use_sim_time = DeclareLaunchArgument(
'use_sim_time', default_value='false',
description=('Set true when using the gazebo simulator.')
)

container = ComposableNodeContainer(
name='tracking_container',
namespace='',
Expand Down Expand Up @@ -46,4 +54,8 @@ def generate_launch_description():
output='screen',
)

return launch.LaunchDescription([container])
return LaunchDescription([
declare_use_sim_time,
SetParameter(name='use_sim_time', value=LaunchConfiguration('use_sim_time')),
container
])

0 comments on commit 5d97674

Please sign in to comment.