Skip to content
Snippets Groups Projects
Commit f552baab authored by Rainer Kartmann's avatar Rainer Kartmann
Browse files

Add setter

parent 4ed2b381
No related branches found
No related tags found
No related merge requests found
......@@ -728,6 +728,11 @@ void MujocoIO::setActuatorTypeSuffixes(const std::map<ActuatorType, std::string>
this->actuatorTypeSuffixes = suffixes;
}
void MujocoIO::setBodySanitizeMode(BodySanitizeMode mode)
{
this->bodySanitizeMode = mode;
}
void MujocoIO::setWithMocapBody(bool enabled)
{
this->withMocapBody = enabled;
......
......@@ -8,18 +8,17 @@
#include "BodySanitizer.h"
namespace VirtualRobot
{
namespace mujoco
namespace VirtualRobot::mujoco
{
/// Actuator type.
enum class ActuatorType
{
MOTOR, POSITION, VELOCITY,
};
ActuatorType toActuatorType(const std::string& string);
/// Body sanitization mode.
enum class BodySanitizeMode
{
......@@ -29,6 +28,9 @@ namespace mujoco
BodySanitizeMode toBodySanitizeMode(const std::string& string);
/**
* @brief Converts a VirtualRobot robot model to MuJoCo MJCF format.
*/
class MujocoIO
{
public:
......@@ -66,6 +68,8 @@ namespace mujoco
/// Set suffixes appended to actuator names if adding actuator type suffixes is enabled.
void setActuatorTypeSuffixes(const std::map<ActuatorType, std::string>& suffixes);
/// Set the body sanitize mode.
void setBodySanitizeMode(BodySanitizeMode mode);
/**
* @brief Enable or disable adding of a mocap body controlling the robot pose.
......@@ -201,4 +205,4 @@ namespace mujoco
};
}}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment