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

Add controller name parameter #212

Merged
merged 3 commits into from
Jan 3, 2024
Merged

Conversation

delihus
Copy link
Contributor

@delihus delihus commented Dec 29, 2023

This PR resolves this issue #187

It is great feature to use the same config file for real and simulated robot, urdf:

<gazebo>
  <plugin filename="ign_ros2_control-system" name="ign_ros2_control::IgnitionROS2ControlPlugin">

    <xacro:if value="${mecanum}">
      <parameters>$(find rosbot_controller)/config/mecanum_drive_controller.yaml</parameters>
    </xacro:if>
    <xacro:unless value="${mecanum}">
      <parameters>$(find rosbot_controller)/config/diff_drive_controller.yaml</parameters>
    </xacro:unless>

    <controller_manager_name>simulation_controller_manager</controller_manager_name>

    <ros>
      <namespace>${gz_control_namespace}</namespace>
      <remapping>rosbot_base_controller/cmd_vel_unstamped:=cmd_vel</remapping>
      <remapping>/tf:=tf</remapping>
    </ros>
  </plugin>
</gazebo>

config:

/**/simulation_controller_manager:
  ros__parameters:
    use_sim_time: True
    update_rate: 20 # Hz

    joint_state_broadcaster:
      type: joint_state_broadcaster/JointStateBroadcaster
    rosbot_base_controller:
      type: diff_drive_controller/DiffDriveController
    imu_broadcaster:
      type: imu_sensor_broadcaster/IMUSensorBroadcaster

/**/controller_manager:
  ros__parameters:
    use_sim_time: False
    update_rate: 20 # Hz

    joint_state_broadcaster:
      type: joint_state_broadcaster/JointStateBroadcaster
    rosbot_base_controller:
      type: diff_drive_controller/DiffDriveController
    imu_broadcaster:
      type: imu_sensor_broadcaster/IMUSensorBroadcaster

Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>
@ahcorde ahcorde merged commit b77f972 into ros-controls:humble Jan 3, 2024
3 checks passed
@ahcorde
Copy link
Collaborator

ahcorde commented Jan 3, 2024

https://github.com/Mergifyio backport iron master

Copy link
Contributor

mergify bot commented Jan 3, 2024

backport iron master

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Jan 3, 2024
Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>
(cherry picked from commit b77f972)

# Conflicts:
#	gz_ros2_control/src/gz_ros2_control_plugin.cpp
mergify bot pushed a commit that referenced this pull request Jan 3, 2024
Signed-off-by: Jakub Delicat <jakub.delicat@husarion.com>
(cherry picked from commit b77f972)

# Conflicts:
#	gz_ros2_control/src/gz_ros2_control_plugin.cpp
ahcorde added a commit that referenced this pull request Jan 3, 2024
Signed-off-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
Co-authored-by: Jakub Delicat <109142865+delihus@users.noreply.github.com>
Co-authored-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>
ahcorde added a commit that referenced this pull request Jan 3, 2024
Signed-off-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
Co-authored-by: Jakub Delicat <109142865+delihus@users.noreply.github.com>
Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
@delihus delihus deleted the humble branch January 4, 2024 07:03
@delihus delihus restored the humble branch January 4, 2024 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants