Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into mx/remove_config_dupl…
Browse files Browse the repository at this point in the history
…ication_by_using_compose_consistently
  • Loading branch information
maxpolzin committed Feb 13, 2024
2 parents 22c3b6e + 92a5384 commit 26d15c5
Show file tree
Hide file tree
Showing 50 changed files with 788 additions and 1,256 deletions.
2 changes: 1 addition & 1 deletion dynamixel_hardware
71 changes: 41 additions & 30 deletions helix_bringup/launch/helix_bringup.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ def generate_launch_description():
robot_description_config = xacro.process_file(robot_description, mappings={'mesh_url' : f'http://{socket.gethostname()}.local'})
# robot_description_config = xacro.process_file(robot_description, mappings={'mesh_url' : 'package://helix_description'})

# Publishes robot frames to tf using URDF and /joint_states
robot_state_publisher = Node(
package="robot_state_publisher",
executable="robot_state_publisher",
Expand All @@ -25,53 +26,63 @@ def generate_launch_description():
output="screen",
)

# Publishes full set of joint states to /joint_states, from multiple sources
# TODO - add helix_arm_joint_state_broadcaster/joint_states to source list once implemented in ros-helix-proprietary.git/helix_nonlinear_model
joint_state_publisher_node = Node(
package='joint_state_publisher',
executable='joint_state_publisher',
name='joint_state_publisher',
parameters=[{
'source_list': ['helix_joint_state_publisher/joint_states','dynamixel_joint_state_publisher/joint_states'],
'source_list': ['motor_head_joint_state_broadcaster/joint_states'],
}]
)




controller_config = os.path.join(
get_package_share_directory(
"helix_description"), "config", "controllers.yaml"
)

dynamixel_block_ros2_control_node = Node(
package="controller_manager",
executable="ros2_control_node",
parameters=[controller_config],
remappings=[
('/controller_manager/robot_description', '/robot_description'),
],
output="screen",
)

dynamixel_block_joint_state_broadcaster_node = Node(
package="controller_manager",
executable="spawner",
arguments=["dynamixel_joint_state_publisher", "--controller-manager", "/controller_manager"],
parameters=[controller_config],
output="screen",
)
# Main ros2_control startup node
helix_ros2_control_node = Node(
package="controller_manager",
executable="ros2_control_node",
parameters=[controller_config],
remappings=[
('/controller_manager/robot_description', '/robot_description'),
],
output="screen",
)

dynamixel_block_position_controller_node = Node(
package="controller_manager",
executable="spawner",
arguments=["dynamixel_position_controller", "-c", "/controller_manager"],
output="screen",
)
# ros2_control controller for motor joint positions
motor_head_joint_position_controller_node = Node(
package="controller_manager",
executable="spawner",
arguments=["motor_head_joint_position_controller", "-c", "/controller_manager"],
output="screen",
)

# ros2_control controller for motor joint efforts
# motor_head_helix_joint_effort_controller_node = Node(
# package="controller_manager",
# executable="spawner",
# arguments=["motor_head_joint_effort_controller", "--inactive", "-c", "/controller_manager"],
# output="screen",
# )

# ros2_control 'controller' (broadcaster) for motor joint states
motor_head_joint_state_broadcaster_node = Node(
package="controller_manager",
executable="spawner",
arguments=["motor_head_joint_state_broadcaster", "--controller-manager", "/controller_manager"],
output="screen",
)


ld.add_action(robot_state_publisher)
ld.add_action(joint_state_publisher_node)
ld.add_action(dynamixel_block_ros2_control_node)
ld.add_action(dynamixel_block_joint_state_broadcaster_node)
ld.add_action(dynamixel_block_position_controller_node)
ld.add_action(helix_ros2_control_node)
ld.add_action(motor_head_joint_position_controller_node)
# ld.add_action(motor_head_helix_joint_effort_controller_node)
ld.add_action(motor_head_joint_state_broadcaster_node)

return ld
2 changes: 1 addition & 1 deletion helix_bringup/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<package format="3">
<name>helix_bringup</name>
<version>0.0.1</version>
<description>The helix_brinup package</description>
<description>The helix_bringup package</description>
<maintainer email="[email protected]">max</maintainer>
<license>proprietary</license>

Expand Down
48 changes: 30 additions & 18 deletions helix_description/config/controllers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,41 @@ controller_manager:
ros__parameters:
update_rate: 100 # Hz

dynamixel_position_controller:
motor_head_joint_position_controller:
type: position_controllers/JointGroupPositionController

dynamixel_joint_state_publisher:
type: joint_state_broadcaster/JointStateBroadcaster
# motor_head_joint_effort_controller:
# type: effort_controllers/JointGroupEffortController

motor_head_joint_state_broadcaster:
type: joint_state_broadcaster/JointStateBroadcaster

dynamixel_position_controller:
motor_head_joint_position_controller:
ros__parameters:
joints:
- dynamixel0
- dynamixel1
- dynamixel2
- dynamixel3
- dynamixel4
- dynamixel5
- dynamixel6
- dynamixel7
- dynamixel8
- dynamixel9
- dynamixel10
- dynamixel11
joints: # TODO - descriptive names for joints/motors?
- joint0
- joint1
- joint2
- joint3
- joint4
- joint5
- joint6
- joint7
- joint8

# motor_head_joint_effort_controller:
# ros__parameters:
# joints:
# - joint0
# - joint1
# - joint2
# - joint3
# - joint4
# - joint5
# - joint6
# - joint7
# - joint8

dynamixel_joint_state_publisher:
motor_head_joint_state_broadcaster:
ros__parameters:
use_local_topics: True
Loading

0 comments on commit 26d15c5

Please sign in to comment.