Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix controller spawn error #11

Merged
merged 1 commit into from
Dec 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading