Add inner radius as a parameter for the sdf gear plugin.

PiperOrigin-RevId: 578789045
Change-Id: Id69418d6b1adcce404927de4ed68c94a5ec1f66f
This commit is contained in:
Google DeepMind
2023-11-02 03:01:34 -07:00
committed by Copybara-Service
parent 3c0a56c1e5
commit e6dc5ed176
2 changed files with 10 additions and 7 deletions
+4 -4
View File
@@ -16,7 +16,6 @@
#define MUJOCO_PLUGIN_SDF_GEAR_H_
#include <optional>
#include <vector>
#include <mujoco/mjdata.h>
#include <mujoco/mjmodel.h>
@@ -27,10 +26,11 @@
namespace mujoco::plugin::sdf {
struct GearAttribute {
static constexpr int nattribute = 4;
static constexpr int nattribute = 5;
static constexpr char const* names[nattribute] = {"alpha", "diameter",
"teeth", "thickness"};
static constexpr mjtNum defaults[nattribute] = { 0, 2.8, 25, .2 };
"teeth", "thickness",
"innerdiameter"};
static constexpr mjtNum defaults[nattribute] = { 0, 2.8, 25, .2 , -1};
};
class Gear {