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

Added controller_namesapce to the left_wheel_names and right_wheel_na… #825

Closed
wants to merge 1 commit into from

Conversation

suchetanrs
Copy link

@suchetanrs suchetanrs commented Nov 10, 2023

The controller namespace is added to the odom_frame_id and the base_frame_id. However, it is not done to the left_wheel_names and right_wheel_names.

The differential drive controller is often used as a gazebo plugin like below.

    <gazebo>
      <plugin filename="libgazebo_ros2_control.so" name="gazebo_ros2_control">
        <namespace>${robot_namespace}</namespace>
        <robot_param>robot_description</robot_param>
        <robot_param_node>robot_state_publisher</robot_param_node>
        <parameters>package://robot_description/config/robot_control.yaml</parameters>
      </plugin>
    </gazebo>

Since this is defined inside a xacro, the Rewritten yaml cannot be used to add namespaces to joints. Adding the namespace in the cpp file bypasses this issue. In the PR, the convention is followed. That is, "robot_namespace/left_wheel_name". Please let me know if I need to change it in any other place. The modified changes solves my issue and seems to run correctly on the Gazebo simulator.

…mes parameters

The controller namespace is added to the odom_frame_id and the base_frame_id. However, it is not done to the left_wheel_names and right_wheel_names.

The differential drive controller is often used as a gazebo plugin like below. Since this is defined inside a xacro, the Rewritten yaml cannot be used to add namespaces to joints. Adding the namespace in the cpp file bypasses this issue. 
In the PR, the convention is followed. That is, "robot_namespace/left_wheel_name".
Please let me know if I need to change it in any other place. The modified changes solves my issue.
```
    <gazebo>
      <plugin filename="libgazebo_ros2_control.so" name="gazebo_ros2_control">
        <namespace>${robot_namespace}</namespace>
        <robot_param>robot_description</robot_param>
        <robot_param_node>robot_state_publisher</robot_param_node>
        <parameters>package://scout_description/config/robot_control.yaml</parameters>
      </plugin>
    </gazebo>
```
Copy link
Contributor

@christophfroehlich christophfroehlich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

According to our guidelines: Please target the PR to the master branch, and we will perform backports to iron+humble.

@suchetanrs
Copy link
Author

I have done as requested. Sorry for the PR in the wrong place :P

@christophfroehlich
Copy link
Contributor

I have done as requested. Sorry for the PR in the wrong place :P

no worries, thanks for your PR. I'll close this one here in favor of #831

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.

2 participants