Skip to content

raisim::ArticulatedSystemVisual ​

struct · #include <raisim/server/Visuals.hpp>

Visual-only articulated system (no physics) streamed by RaisimServer. Create with RaisimServer::addVisualArticulatedSystem(); the server owns it.

Constructors & destructor ​

ArticulatedSystemVisual ​

cpp
ArticulatedSystemVisual(const std::string &urdfFile)

Load the model. Normally called by RaisimServer::addVisualArticulatedSystem().

Parameters

ParameterDescription
urdfFile (in)path to the model file, as accepted by the ArticulatedSystem constructor

~ArticulatedSystemVisual ​

cpp
~ArticulatedSystemVisual() = default

Public member functions ​

setColor ​

cpp
void setColor(double r, double g, double b, double a)

Parameters

ParameterDescription
r (in)red value (max=1)
g (in)green value (max=1)
b (in)blue value (max=1)
a (in)alpha value (max=1) set color. if the alpha value is 0, it uses the original color defined in the mesh file

setGeneralizedCoordinate ​

cpp
void setGeneralizedCoordinate(const Eigen::VectorXd &gc)

Parameters

ParameterDescription
gc (in)the generalized coordinate (size ArticulatedSystem::getGeneralizedCoordinateDim()) set the configuration of the visualized articulated system

lockMutex ​

cpp
void lockMutex()

Lock this visual's mutex. The server holds it while serializing this visual, so lock it while modifying the visual from another thread. Same as lock().

lock ​

cpp
void lock()

Lock the mutex (BasicLockable interface for std::lock_guard / std::unique_lock).

try_lock ​

cpp
bool try_lock()

Returns true if the mutex was acquired without blocking (Lockable interface).

unlockMutex ​

cpp
void unlockMutex()

Unlock the mutex locked by lockMutex(). Same as unlock().

unlock ​

cpp
void unlock()

Unlock the mutex (BasicLockable interface).

Public attributes ​

color ​

cpp
raisim::Vec<4> color

Override color for the entire visualized system (RGBA).

obj ​

cpp
ArticulatedSystem obj

Articulated system used for visualization only.

RaiSim — physics for robotics and AI.