Skip to content

Commit

Permalink
Merge branch 'migrate_control' into ros-2-complete
Browse files Browse the repository at this point in the history
  • Loading branch information
DinoSage committed Feb 10, 2024
2 parents 6477f66 + 5bbff40 commit 09513e5
Show file tree
Hide file tree
Showing 5 changed files with 104 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/rktl_control/launch/ball.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@
def generate_launch_description():
ld = launch.LaunchDescription([
launch_ros.actions.Node(
namespace='ball',
package='rktl_control',
executable='mean_odom_filter',
name='mean_odom_filter',
output='screen',
parameters=[
get_package_share_directory(
'rktl_control') + '/config/mean_odom_filter.yaml'
{
launch.substitutions.PathJoinSubstitution(launch_ros.substitutions.FindPackageShare('rktl_control'), '/config/mean_odom_filter.yaml')
}
]
)
])
Expand Down
49 changes: 49 additions & 0 deletions src/rktl_control/launch/car.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,55 @@ def generate_launch_description():
launch.actions.DeclareLaunchArgument(
name='use_particle_filter',
default_value='true'
),
launch.actions.GroupAction(
actions=[
launch_ros.actions.PushRosNamespace("cars/" + launch.substitutions.LaunchConfiguration("car_name")),

launch_ros.actions.Node(
package='rktl_control',
executable='particle_odom_filter',
name='particle_odom_filter',
output='screen',
condition=launch.conditions.LaunchConfigurationEquals('use_particle_filter', True),
parameters=[
{
launch.substitutions.PathJoinSubstitution(launch_ros.substitutions.FindPackageShare('rktl_control'), '/config/particle_odom_filter.yaml')
},
{
'frame_ids/body': launch.substitutions.LaunchConfiguration('car_name')
}
]
),

launch_ros.actions.Node(
package='rktl_control',
executable='mean_odom_filter',
name='mean_odom_filter',
output='screen',
condition=launch.conditions.LaunchConfigurationNotEquals('use_particle_filter', True),
parameters=[
{
launch.substitutions.PathJoinSubstitution(launch_ros.substitutions.FindPackageShare('rktl_control'), '/config/mean_odom_filter.yaml')
},
{
'frame_ids/body': launch.substitutions.LaunchConfiguration('car_name')
}
]
),

launch_ros.actions.Node(
package='rktl_control',
executable='controller',
name='controller',
output='screen',
parameters=[
{
launch.substitutions.PathJoinSubstitution(launch_ros.substitutions.FindPackageShare('rktl_control'), '/config/controller.yaml')
},
]
)
]
)
])
return ld
Expand Down
5 changes: 3 additions & 2 deletions src/rktl_control/launch/hardware_interface.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ def generate_launch_description():
executable='serial_node.py',
name='hardware_interface',
parameters=[
get_package_share_directory(
'rktl_control') + '/config/hardware_interface.yaml'
{
launch.substitutions.PathJoinSubstitution(launch_ros.substitutions.FindPackageShare('rktl_control'), '/config/hardware_interface.yaml')
}
]
)
])
Expand Down
1 change: 1 addition & 0 deletions src/rktl_control/launch/keyboard_control.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ def generate_launch_description():
default_value='car0'
),
launch_ros.actions.Node(
namespace=launch.substitutions.PathJoinSubstitution('cars/', launch_ros.substitutions.FindPackageShare('car_name')),
package='rktl_control',
executable='keyboard_interface',
name='keyboard_interface',
Expand Down
47 changes: 47 additions & 0 deletions src/rktl_control/launch/xbox_control.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,54 @@ def generate_launch_description():
launch.actions.DeclareLaunchArgument(
name='delay',
default_value='0.1'
),
launch.actions.GroupAction(
actions=[
launch_ros.actions.PushRosNamespace("cars/" + launch.substitutions.LaunchConfiguration("car_name")),

launch_ros.actions.Node(
package='joy',
executable='joy_node',
name='joy_node',
output='screen',
parameters=[
{
'dev': launch.substitutions.LaunchConfiguration('device')
},
{
'default_trig_val': 'true'
}
]
),
launch_ros.actions.Node(
package='rktl_control',
executable='xbox_interface',
name='xbox_interface',
output='screen',
parameters=[
{
'base_throttle': '0.75'
},
{
'boost_throttle': '1.25'
},
{
'cooldown_ratio': '3'
},
{
'max_boost': '2'
}
],
actions=[
launch_ros.actions.SetRemap(
src="joy",
dst="joy)mux",
)
]
)
]
)

])
return ld

Expand Down

0 comments on commit 09513e5

Please sign in to comment.