-
Notifications
You must be signed in to change notification settings - Fork 91
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
Fix initial_value
not working (backport #241)
#243
Conversation
(cherry picked from commit c5b0b90) # Conflicts: # ign_ros2_control/src/ign_system.cpp
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
ign_ros2_control/src/ign_system.cpp
Outdated
@@ -376,9 +378,15 @@ bool IgnitionSystem::initSim( | |||
// independently of existence of command interface set initial value if defined | |||
if (!std::isnan(initial_position)) { | |||
this->dataPtr->joints_[j].joint_position = initial_position; | |||
this->dataPtr->ecm->CreateComponent( | |||
this->dataPtr->joints_[j].sim_joint, | |||
sim::components::JointPositionReset({initial_position})); |
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.
It should be ignition::gazebo::components::JointPositionReset({initial_position}));, right?
ign_ros2_control/src/ign_system.cpp
Outdated
} | ||
if (!std::isnan(initial_velocity)) { | ||
this->dataPtr->joints_[j].joint_velocity = initial_velocity; | ||
this->dataPtr->ecm->CreateComponent( | ||
this->dataPtr->joints_[j].sim_joint, | ||
sim::components::JointVelocityReset({initial_velocity})); |
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.
And ignition::gazebo::components::JointVelocityReset({initial_velocity})); here
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
This is an automatic backport of pull request #241 done by Mergify.
Cherry-pick of c5b0b90 has failed:
To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally
Mergify commands and options
More conditions and actions can be found in the documentation.
You can also trigger Mergify actions by commenting on this pull request:
@Mergifyio refresh
will re-evaluate the rules@Mergifyio rebase
will rebase this PR on its base branch@Mergifyio update
will merge the base branch into this PR@Mergifyio backport <destination>
will backport this PR on<destination>
branchAdditionally, on Mergify dashboard you can:
Finally, you can contact us on https://mergify.com