-
Notifications
You must be signed in to change notification settings - Fork 388
add read_only parameters to diff_drive_controller #1781
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
base: master
Are you sure you want to change the base?
Conversation
} | ||
open_loop: { | ||
type: bool, | ||
default_value: false, | ||
description: "If set to true the odometry of the robot will be calculated from the commanded values and not from feedback.", | ||
read_only: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want this to be false?. Does it make sense to change this online?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can i make this true?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure
} | ||
position_feedback: { | ||
type: bool, | ||
default_value: true, | ||
description: "Is there position feedback from hardware.", | ||
read_only: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
read_only: false, | |
read_only: true, |
} | ||
publish_rate: { | ||
type: double, | ||
default_value: 50.0, # Hz | ||
description: "Publishing rate (Hz) of the odometry and TF messages.", | ||
read_only: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
read_only: false, | |
read_only: true, |
This should be constant too
} | ||
publish_rate: { | ||
type: double, | ||
default_value: 50.0, # Hz | ||
description: "Publishing rate (Hz) of the odometry and TF messages.", | ||
read_only: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
read_only: false, | |
read_only: true, |
This should be constant too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parameters itself look good. But we don't update the parameters post on_configure. I propose changing this to a simple get_params() as on_configure is not in the RT thread
ros2_controllers/diff_drive_controller/src/diff_drive_controller.cpp
Lines 313 to 317 in 922e49b
// update parameters if they have changed | |
if (param_listener_->try_update_params(params_)) | |
{ | |
RCLCPP_INFO(logger, "Parameters were updated"); | |
} |
but add this
try_update_params
to the update_reference_from_subscribers
or update_and_write_commands
method.
Please review then also if we need local copies of the params_
-struct members and either remove it or update them after try_update_params
. (cmd_vel_timeout_
, publish_limited_velocity_
,..)
This PR adds the read_only attribute to key parameters of diff_drive_controller.Related to #1696