Interpret position and intvelocity setpoints on 3D rotational transmissions (ball joints, site+refsite) on the circle. The force uses the setpoint representative nearest the current length for smooth tracking beyond pi.

- Wrapping in force path is local; act is re-anchored at integration time.
- Remove hardcoded `actrange` for intvelocity actuators.

PiperOrigin-RevId: 949566477
Change-Id: I349fdf17eedfbb2174d698cc1a6a91d52810b4a3
This commit is contained in:
Yuval Tassa
2026-07-17 07:48:46 -07:00
committed by Copybara-Service
parent 9331c1cd9b
commit 56a93979e0
9 changed files with 301 additions and 39 deletions
+4 -4
View File
@@ -2859,7 +2859,7 @@ TEST_F(ActuatorParseTest, IntvelocityCheckDefaultsIfNotSpecified) {
EXPECT_DOUBLE_EQ(model->actuator_biasprm[2], 0.0);
}
TEST_F(ActuatorParseTest, IntvelocityNoActrangeThrowsError) {
TEST_F(ActuatorParseTest, IntvelocityNoActrangeIsValid) {
static constexpr char xml[] = R"(
<mujoco>
<worldbody>
@@ -2875,9 +2875,9 @@ TEST_F(ActuatorParseTest, IntvelocityNoActrangeThrowsError) {
)";
std::array<char, 1024> error;
MjModelPtr model = LoadModelFromString(xml, error.data(), error.size());
ASSERT_THAT(model.get(), IsNull());
EXPECT_THAT(error.data(), HasSubstr("invalid actrange for actuator"));
EXPECT_THAT(error.data(), HasSubstr("line 10"));
ASSERT_THAT(model.get(), NotNull()) << error.data();
// actlimited resolves to false when no actrange is provided
EXPECT_EQ(model->actuator_actlimited[0], 0);
}
TEST_F(ActuatorParseTest, IntvelocityDefaultsPropagate) {