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

Publish Joint forces #2369

Closed
wants to merge 103 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
9896923
Merge pull request #2199 from gazebosim/merge_8_main_20231010
iche033 Oct 10, 2023
6686c03
Bumps in Ionic: gz-sim9 (#2205)
iche033 Oct 12, 2023
7a460cd
Bumps in ionic : ci_matching_branch/bump_ionic_gz-sim9 (#2211)
azeey Oct 18, 2023
efc3bed
Use sdf FindElement API to avoid const_cast (#2231)
scpeters Nov 10, 2023
734977a
Merge branch 'gz-sim8' into scpeters/merge_8_main
scpeters Nov 13, 2023
9f21c6e
Merge pull request #2244 from gazebosim/scpeters/merge_8_main
scpeters Nov 15, 2023
451dcf3
Enable HIDE_SYMBOLS_BY_DEFAULT + linux patches (#2248)
j-rivero Dec 18, 2023
c158287
Remove HIDE_SYMBOLS_BY_DEFAULT: replace by a default configuration in…
j-rivero Jan 12, 2024
0f27ce0
Regroup tutorials into four categories (#2109)
mabelzhang Jan 18, 2024
220236f
merge from gz-sim8
iche033 Mar 13, 2024
295d6f9
merge from gz-sim8
iche033 Mar 13, 2024
250c939
Merge pull request #2334 from gazebosim/merge_8_main_20240313
iche033 Apr 1, 2024
00f2676
Merge branch 'gz-sim8' into scpeters/merge_8_main
scpeters Apr 5, 2024
301832d
Merge pull request #2363 from gazebosim/scpeters/merge_8_main
scpeters Apr 5, 2024
77f4c00
Physics: remove *VelocityCmd at each time step (#2228)
scpeters Apr 9, 2024
13a76e1
publish jointForces
Fixit-Davide Apr 12, 2024
1205d00
fix
Fixit-Davide Apr 12, 2024
a989ad1
update
Fixit-Davide Apr 19, 2024
098085b
Merge from gz-sim8
iche033 Apr 19, 2024
ad3ef0a
Merge 8 -> main (#2378)
mjcarroll May 2, 2024
9e45959
Fix warn unused variable in test (#2388)
Blast545 Apr 29, 2024
3c2a3ce
ForceTorque system: improve readability (#2403)
scpeters May 13, 2024
cd068de
Merge branch 'gz-sim8' into scpeters/merge_8_main
scpeters May 29, 2024
6ab114f
Merge pull request #2422 from gazebosim/scpeters/merge_8_main
iche033 May 31, 2024
4c34f4e
Parse and set bullet solver iterations (#2351)
iche033 May 31, 2024
6f46876
Enable 24.04 CI, require cmake 3.22.1 (#2420)
scpeters Jun 1, 2024
3a33c32
merge from gz-sim8
iche033 Jun 5, 2024
48d3ef2
Merge pull request #2432 from gazebosim/merge_8_main_20240605
azeey Jun 5, 2024
0d78194
Adding cone primitives. (#2410)
bperseghetti Jun 17, 2024
f66701e
shapes.sdf example: bump to 1.12, add cone shape (#2448)
scpeters Jun 17, 2024
ae3f794
Remove cone shape from particle emitter (#2449)
iche033 Jun 17, 2024
e116d0b
Remove python3-distutils from package.xml (#2450)
j-rivero Jun 20, 2024
3487086
Support visualizing mesh collisions with convex decomposition (#2352)
iche033 Jun 25, 2024
0d89949
Fix warnings generated by NetworkConfigTest (#2469)
arjo129 Jul 9, 2024
3c77346
Merge branch 'gz-sim8' into scpeters/merge_8_main
scpeters Jul 10, 2024
1d3eee9
Merge pull request #2472 from gazebosim/scpeters/merge_8_main
scpeters Jul 10, 2024
2994087
Remove systems if their parent entity is removed (#2232)
arjo129 Jul 17, 2024
6b5ec20
Improve signal handling (#2501)
azeey Jul 31, 2024
4499157
Specify System::PreUpdate, Update execution order (#2487)
scpeters Aug 1, 2024
811d4d0
Remove ignition related deprecations (#2505)
iche033 Aug 6, 2024
5c4f0cf
Deprecate use of added mass via hydrodynamics (#2493)
arjo129 Aug 12, 2024
110a568
Merge branch 'gz-sim8' into scpeters/merge_8_main
scpeters Aug 14, 2024
2f4d8c3
ForceTorque system: write WrenchMeasured to ECM (#2494)
scpeters Aug 14, 2024
34672c9
Merge branch 'main' into scpeters/merge_8_main
scpeters Aug 14, 2024
6595a52
Merge pull request #2525 from gazebosim/scpeters/merge_8_main
scpeters Aug 14, 2024
5039e20
Physics: set link velocity from *VelocityReset components (#2489)
yaswanth1701 Aug 14, 2024
0d5ff2d
Add System interface to set default priority (#2500)
scpeters Aug 19, 2024
28694a8
Merge from gz-sim8
iche033 Aug 21, 2024
363d5c3
Fix SphericalCoordinates deprecation warnings (#2535)
iche033 Aug 22, 2024
5298d46
Fix UNIT_Server_TEST failure caused by change in behavior of `gz::com…
azeey Aug 23, 2024
9215f4a
Merge branch 'main' into merge_20240821
iche033 Aug 23, 2024
f519875
Add cmake install prefix (#2539)
iche033 Aug 24, 2024
19801c8
Merge pull request #2533 from gazebosim/merge_20240821
iche033 Aug 26, 2024
1184481
Restore behavior change by reverting #2527 (#2546)
iche033 Aug 27, 2024
af7fabb
Remove <gz:system_priority/> from test worlds (#2551)
scpeters Aug 27, 2024
8b1dbda
Fix crash at exit due to a race condition with new signal handler (#2…
azeey Aug 28, 2024
a893657
Add a flexible mechanism to combine user and default plugins (#2497)
azeey Aug 29, 2024
1d6651d
Update readme, changelog and prepare for 9.0.0pre1 release (#2554)
iche033 Aug 29, 2024
a20bf25
Fix doxygen page links (#2553)
azeey Aug 29, 2024
4ecdb43
Update migration_plugins.md (#2564)
EnzoGhisoni Sep 2, 2024
040acb2
Add world name to documentation (#2571)
avanmalleghem Sep 2, 2024
0dccd06
Fix lander tutorial (#2576)
avanmalleghem Sep 2, 2024
c4906f8
Fix looking up camera name in camera lens system (#2559)
iche033 Sep 2, 2024
f7afdf5
Fixed warning joint trayectory sdf (#2580)
ahcorde Sep 2, 2024
51819ae
Video recorder tutorial fixes. (#2582)
caguero Sep 2, 2024
5a94050
Removed actor population due bad merge (#2581)
ahcorde Sep 2, 2024
7b3d182
Fix hydrodynamics deprecation warning. (#2579)
arjo129 Sep 3, 2024
faebf12
Fix issue #2566: Prevent follow actor plugin from crashing when actor…
arjo129 Sep 3, 2024
8a3d999
Enhance readme (#2573)
avanmalleghem Sep 3, 2024
e5faf77
Update migration_sdf.md (#2563)
EnzoGhisoni Sep 3, 2024
1ff9082
Fix typo plugins to plugin directory in README.md (#2574)
avanmalleghem Sep 3, 2024
6e7f2a0
Update tutorial (#2562)
alesof Sep 3, 2024
4597293
Fix crash when running the optical tactile sensor world (#2561)
iche033 Sep 3, 2024
c04a7d9
Fix logic in actor system (#2584)
iche033 Sep 3, 2024
f0a0e2d
use ogre2 for dem worlds (#2586)
iche033 Sep 4, 2024
20b87f2
Fix crash on windows due to invalid log directory path (#2589)
azeey Sep 4, 2024
5482778
Update particle emitter tutorial (#2585)
iche033 Sep 4, 2024
fec31aa
Fix empty gui tutorial (#2591)
avanmalleghem Sep 4, 2024
8b74a43
Fix particle emitter color range image path warning (#2560)
iche033 Sep 4, 2024
96e1b03
Fix xml and image in create maritime vehicle tutorial (#2592)
alexandrosnic Sep 4, 2024
f8f8a80
Fix configuring global illumination GUI plugin parameters (#2594)
iche033 Sep 5, 2024
518cc31
Fixed typo in gz sim python api (#2578)
ahcorde Sep 5, 2024
086e08d
fix adding system plugins tutorial (#2602)
avanmalleghem Sep 6, 2024
3977d65
Fix known issue section in README (#2603)
avanmalleghem Sep 6, 2024
c1f379e
Update physics system error msg when plugin can not be loaded (#2604)
iche033 Sep 6, 2024
c4f95c4
fix CMakeList example + add link to working example (#2601)
avanmalleghem Sep 9, 2024
96775c8
tutorials: headless_rendering: Little fixes (#2607)
peci1 Sep 9, 2024
712643f
tutorials: Updated point_cloud_to_mesh tutorial to reflect new UI in …
peci1 Sep 9, 2024
9b161db
Fix making breadcrumb static if it's a nested model (#2593)
iche033 Sep 10, 2024
b1f919b
Add tutorial + example SDF for shadow texture size (#2597)
athenaz2 Sep 10, 2024
ca40c1d
Fix log playback GUI display (#2611)
azeey Sep 12, 2024
0f16949
Adds a regression test for logplayback fix in #2611 (#2619)
arjo129 Sep 12, 2024
3765579
Fix typos in joint-tutorial readme. (#2622)
bperseghetti Sep 13, 2024
43b435a
tutorials/terminology: Fixed type (#2625)
peci1 Sep 16, 2024
4c5a914
tutorials/physics: Small fixes and Windows support (#2627)
peci1 Sep 16, 2024
b32c890
README: Windows-related improvements (#2631)
peci1 Sep 16, 2024
0e1f254
tutorials/install: Added Windows instructions (#2628)
peci1 Sep 16, 2024
76305df
Update links in point cloud to mesh tutorial and fix screenshot link …
iche033 Sep 17, 2024
cdca1f1
tutorials/video_recorder: Added note about OGV support (#2634)
peci1 Sep 23, 2024
bbe2cc6
Prepare for 9.0.0 release (#2635)
iche033 Sep 27, 2024
5565815
fix custom sensor system example build (#2649)
iche033 Oct 11, 2024
990f1c2
Fix crash when multicopter motor system is attached to an empty model…
iche033 Oct 16, 2024
6a9a7cb
Merge branch 'gazebosim:gz-sim9' into jointforces
Fixit-Davide Nov 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/systems/joint_state_publisher/JointStatePublisher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ void JointStatePublisher::CreateComponents(EntityComponentManager &_ecm,
}

// Create joint force component if one doesn't exist
if (!_ecm.EntityHasComponentType(_joint, components::JointForce().TypeId()))
if (!_ecm.EntityHasComponentType(_joint,
components::JointForce().TypeId()))
{
_ecm.CreateComponent(_joint, components::JointForce());
}
Expand Down
21 changes: 20 additions & 1 deletion src/systems/physics/Physics.cc
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,13 @@
#include "gz/sim/components/JointPositionLimitsCmd.hh"
#include "gz/sim/components/JointPositionReset.hh"
#include "gz/sim/components/JointType.hh"
#include "gz/sim/components/JointForce.hh"
#include "gz/sim/components/JointVelocity.hh"
#include "gz/sim/components/JointVelocityCmd.hh"
#include "gz/sim/components/JointVelocityLimitsCmd.hh"
#include "gz/sim/components/JointVelocityReset.hh"
#include "gz/sim/components/JointForce.hh"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI warning:

"gz/sim/components/JointForce.hh" already included at /github/workspace/src/systems/physics/Physics.cc:119  

#include "gz/sim/components/JointForceCmd.hh"
#include "gz/sim/components/LinearAcceleration.hh"
#include "gz/sim/components/LinearVelocity.hh"
#include "gz/sim/components/LinearVelocityCmd.hh"
Expand All @@ -130,7 +133,6 @@
#include "gz/sim/components/ParentLinkName.hh"
#include "gz/sim/components/ExternalWorldWrenchCmd.hh"
#include "gz/sim/components/JointTransmittedWrench.hh"
#include "gz/sim/components/JointForceCmd.hh"
#include "gz/sim/components/Physics.hh"
#include "gz/sim/components/PhysicsEnginePlugin.hh"
#include "gz/sim/components/Pose.hh"
Expand Down Expand Up @@ -2791,6 +2793,7 @@ void PhysicsPrivate::ResetPhysics(EntityComponentManager &_ecm)
{
jointPhys->SetVelocity(i, 0.0);
jointPhys->SetPosition(i, 0.0);
jointPhys->SetForce(i, 0.0);
}

return true;
Expand Down Expand Up @@ -3692,6 +3695,22 @@ void PhysicsPrivate::UpdateSim(EntityComponentManager &_ecm,
}
return true;
});
// Update joint Forces
_ecm.Each<components::Joint, components::JointForce>(
[&](const Entity &_entity, components::Joint *,
components::JointForce *_jointForce) -> bool
{
if (auto jointPhys = this->entityJointMap.Get(_entity))
{
_jointForce->Data().resize(jointPhys->GetDegreesOfFreedom());
for (std::size_t i = 0; i < jointPhys->GetDegreesOfFreedom();
++i)
{
_jointForce->Data()[i] = jointPhys->GetForce(i);
}
}
return true;
});
GZ_PROFILE_END();

// Update joint transmitteds
Expand Down
Loading