diff_drive_controller wheel_radius problem
Hi, I use diffdrivecontroller package on my robot. I revised the parameters according to my own robot. But i have a problem. If I set the wheelradius parameter to 1, all the values(jointstates, measuredjointstates, publishwheeljointcontrollerstate) are correct, but if I set it to its real value(0,075 meter) for wheelradius, the Odometry and desiredposition(publishwheeljointcontrollerstate) 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
Asked by klchsyn on 2023-02-23 05:58:42 UTC
Answers
ROS expects you to use a period as a decimal point character, not a comma.
Asked by Mike Scheutzow on 2023-02-23 08:00:07 UTC
Comments
Yes yes actually i used dot 0.075. just i wrote to here with comma
Asked by klchsyn on 2023-02-23 08:39:49 UTC
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.
Asked by Mike Scheutzow on 2023-02-23 08:50:25 UTC
Hi, i edited the description
Asked by klchsyn on 2023-02-24 01:28:50 UTC
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.
Asked by Mike Scheutzow on 2023-02-24 07:55:15 UTC
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.
Asked by miura on 2023-02-26 00:20:11 UTC
How can i do what you say @miura
I tried restart all system but same result @ Mike Scheutzow
Asked by klchsyn on 2023-02-26 13:31:05 UTC
@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.
Asked by miura on 2023-03-04 20:18:31 UTC