Skip to content

Commit

Permalink
Fix controller spawn error (#11)
Browse files Browse the repository at this point in the history
* fix: "No executable found" error when launching fd.launch.py

- There's a space missing between "spawn" and "--controller-manager"
- Use Node instead of ExecuteProcess to spawn controller
- Remove ExecuteProcess import

* style: organize imports in fd.launch.py
  • Loading branch information
CalaW authored Dec 10, 2023
1 parent 0db5e5c commit c44247e
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions fd_bringup/launch/fd.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,13 @@
# limitations under the License.

from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument, ExecuteProcess
from launch.substitutions import Command, FindExecutable
from launch.substitutions import LaunchConfiguration, PathJoinSubstitution
from launch.actions import DeclareLaunchArgument
from launch.substitutions import (
Command,
FindExecutable,
LaunchConfiguration,
PathJoinSubstitution,
)
from launch_ros.actions import Node
from launch_ros.substitutions import FindPackageShare

Expand Down Expand Up @@ -88,14 +92,16 @@ def generate_launch_description():
load_controllers = []
for controller in ['fd_controller', 'joint_state_broadcaster']:
load_controllers += [
ExecuteProcess(
cmd=[
'ros2 run controller_manager spawner' +
f'--controller-manager /fd/controller_manager {controller}'
Node(
package='controller_manager',
executable='spawner',
namespace='fd',
arguments=[
controller,
'--controller-manager',
'/fd/controller_manager',
],
shell=True,
output='screen',
)
),
]

nodes = [
Expand Down

0 comments on commit c44247e

Please sign in to comment.