ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

diff_drive_controller wheel_radius problem

asked 2023-02-23 04:58:42 -0500

klchsyn gravatar image

updated 2023-02-24 00:28:21 -0500

Hi, I use diff_drive_controller package on my robot. I revised the parameters according to my own robot. But i have a problem. If I set the wheel_radius parameter to 1, all the values(joint_states, measured_joint_states, publish_wheel_joint_controller_state) are correct, but if I set it to its real value(0,075 meter) for wheel_radius, the Odometry and desired_position(publish_wheel_joint_controller_state) datas are corrupted. How can i fix this problem? Thank you!

Thats my config;

mycontrol_bot:
  # Settings for ros_control hardware interface
  hardware_interface:
     joints:
        - wheel_0_joint
        - wheel_1_joint

  # Publish all joint states -----------------------------------
  joint_state_controller:
    type: joint_state_controller/JointStateController
    publish_rate: 50


  mobile_base_controller:
    type: diff_drive_controller/DiffDriveController
    publish_rate: 50

    left_wheel: 'wheel_0_joint'
    right_wheel: 'wheel_1_joint'

    # Wheel separation and diameter. These are both optional.
    # diff_drive_controller will attempt to read either one or both from the
    # URDF if not specified as a parameter
    wheel_separation : 0.3175
    wheel_radius : 0.0755 # 1.0


    publish_cmd: True
    publish_wheel_joint_controller_state: True

    # Odometry covariances for the encoder output of the robot. These values should
    # be tuned to your robot's sample odometry data, but these values are a good place
    # to start
    pose_covariance_diagonal: [0.001, 0.001, 0.001, 0.001, 0.001, 0.03]
    twist_covariance_diagonal: [0.001, 0.001, 0.001, 0.001, 0.001, 0.03]

    # Top level frame (link) of the robot description
    base_frame_id: base_footprint

    # Velocity and acceleration limits for the robot
    linear:
      x:
        has_velocity_limits    : true
        max_velocity           : 1.0  # m/s
        min_velocity           : -0.5 # m/s
        has_acceleration_limits: true
        max_acceleration       : 0.8  # m/s^2
        min_acceleration       : -0.4 # m/s^2
        has_jerk_limits        : true
        max_jerk               : 5.0  # m/s^3
    angular:
      z:
        has_velocity_limits    : true
        max_velocity           : 1.7  # rad/s
        has_acceleration_limits: true
        max_acceleration       : 1.5  # rad/s^2
        has_jerk_limits        : true
        max_jerk               : 2.5  # rad/s^3
edit retag flag offensive close merge delete

Comments

Please edit your description to show us the exact config info; format it with the 101010 button. You edit using the "edit" button near the end of the description.

Mike Scheutzow gravatar image Mike Scheutzow  ( 2023-02-23 07:50:25 -0500 )edit

Hi, i edited the description

klchsyn gravatar image klchsyn  ( 2023-02-24 00:28:50 -0500 )edit

I don't see any problems in this config. Have you tried restarting the ros master? Sometimes unexpected properties get into the rosparam database while debugging.

Mike Scheutzow gravatar image Mike Scheutzow  ( 2023-02-24 06:55:15 -0500 )edit

It seems that the wheel_0_joint and wheel_1_joint settings need to be reviewed.

It may be that wheel_0_joint has changed from its original correct value as a result of adjustments to make it work when wheel_radius is 1.0. If you describe the wheel_0_joint setting, we may be able to provide some additional input.

miura gravatar image miura  ( 2023-02-25 23:20:11 -0500 )edit

How can i do what you say @miura

I tried restart all system but same result @ Mike Scheutzow

klchsyn gravatar image klchsyn  ( 2023-02-26 12:31:05 -0500 )edit

@klchsyn I don't know if I can help because I lack information on how wheel_0_joint is implemented. For example, but you could update the URDF parameters for wheel_0_jointn.

miura gravatar image miura  ( 2023-03-04 19:18:31 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-02-23 07:00:07 -0500

Mike Scheutzow gravatar image

ROS expects you to use a period as a decimal point character, not a comma.

edit flag offensive delete link more

Comments

Yes yes actually i used dot 0.075. just i wrote to here with comma

klchsyn gravatar image klchsyn  ( 2023-02-23 07:39:49 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2023-02-23 04:58:42 -0500

Seen: 486 times

Last updated: Feb 24 '23