-
Notifications
You must be signed in to change notification settings - Fork 318
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
Avoid redeclaration of parameters (automatically declared parameters) #224
Avoid redeclaration of parameters (automatically declared parameters) #224
Conversation
Are you sure this didn't work before? Controllers should have auto-declaration of parameters enabled... Would be nice to get some test for this, showing what exactly wasn't working. |
Pretty sure, I will try to make tests to show the problem. |
This line enables auto-declaration of parameters. That's the reason I am asking... |
I can confirm that this is needed. If you change the log level to debug, it will log the parameters. Regardless of the parameters specified, it is always 0. |
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.
Ok. We may need to revisit this in Galactic but if it's blocking on Foxy, I'm tempted to merge it now
Speaking too soon perhaps :D @livanov93 @Ace314159 , what ROS distro are you guys running?
Is something wrong with how we test this perhaps? Or some bug in rclcpp that makes it work with the test setup but not otherwise? |
@bmagyar Still I think that there is a misunderstanding of There is a small discussion on the documentation improvements here and here. So in my understanding controller_interface should have |
Using |
It seems this was removed due to some error report from you earlier ;) could you test locally that fixing in controller_interface.cpp actually works? |
Yes, it is correct. Still I realized we had wrong approach in ros_controls/ros2_control#276. We just had to add check if some parameter already exist before its declaration in all of the controllers (everything that inherits from controller_interface). Something like this. |
f996475
to
3c61e4f
Compare
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.
Looks good and sensible chnage! Thanks!
* introducing handles Signed-off-by: Karsten Knese <[email protected]> * component interfaces & tests Signed-off-by: Karsten Knese <[email protected]> * linters Signed-off-by: Karsten Knese <[email protected]> * import resource manager Signed-off-by: Karsten Knese <[email protected]> * correct year Signed-off-by: Karsten Knese <[email protected]> * import handles from loaded components Signed-off-by: Karsten Knese <[email protected]> * wip / debug Signed-off-by: Karsten Knese <[email protected]> * parse components Signed-off-by: Karsten Knese <[email protected]> * changes after rebase Signed-off-by: Karsten Knese <[email protected]> * component parser as shared library Signed-off-by: Karsten Knese <[email protected]> * validate urdf configuratin Signed-off-by: Karsten Knese <[email protected]> * documentation Signed-off-by: Karsten Knese <[email protected]> * remove default constructor Signed-off-by: Karsten Knese <[email protected]> * resource loaning Signed-off-by: Karsten Knese <[email protected]> * loan state interface Signed-off-by: Karsten Knese <[email protected]> * import externally declared components Signed-off-by: Karsten Knese <[email protected]> * move resource manager to hardware interface (ros-controls#226) * move resource manager to hardware interface Signed-off-by: Karsten Knese <[email protected]> * include functional for std::function Co-authored-by: Bence Magyar <[email protected]> * address review comments Signed-off-by: Karsten Knese <[email protected]> Co-authored-by: Bence Magyar <[email protected]>
PR addresses #149. Parameters are needed for checks within jtc.
As mentioned here in the future adjusting detailed per joint parameters could be done dynamically.
EDIT:
PR enables existence of parameters uploaded via overrides (e.g. yaml files). It is blocked by #ros2_control/PR504