Skip to content
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

Merged
merged 3 commits into from
Feb 27, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Feb 26, 2024

This is an automatic backport of pull request #241 done by Mergify.
Cherry-pick of c5b0b90 has failed:

On branch mergify/bp/humble/pr-241
Your branch is up to date with 'origin/humble'.

You are currently cherry-picking commit c5b0b90.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   ign_ros2_control/src/ign_system.cpp

no changes added to commit (use "git add" and/or "git commit -a")

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> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

(cherry picked from commit c5b0b90)

# Conflicts:
#	ign_ros2_control/src/ign_system.cpp
@mergify mergify bot requested a review from ahcorde as a code owner February 26, 2024 09:04
@mergify mergify bot added the conflicts label Feb 26, 2024
@mergify mergify bot mentioned this pull request Feb 26, 2024
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
@@ -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}));
Copy link

@bmrocamora bmrocamora Feb 27, 2024

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?

}
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}));

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]>
@ahcorde ahcorde merged commit ad76ddc into humble Feb 27, 2024
3 of 4 checks passed
@ahcorde ahcorde deleted the mergify/bp/humble/pr-241 branch February 27, 2024 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants