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
ArticulatedSystemVisual(const std::string &urdfFile)Load the model. Normally called by RaisimServer::addVisualArticulatedSystem().
Parameters
| Parameter | Description |
|---|---|
urdfFile (in) | path to the model file, as accepted by the ArticulatedSystem constructor |
~ArticulatedSystemVisual
~ArticulatedSystemVisual() = defaultPublic member functions
setColor
void setColor(double r, double g, double b, double a)Parameters
| Parameter | Description |
|---|---|
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
void setGeneralizedCoordinate(const Eigen::VectorXd &gc)Parameters
| Parameter | Description |
|---|---|
gc (in) | the generalized coordinate (size ArticulatedSystem::getGeneralizedCoordinateDim()) set the configuration of the visualized articulated system |
lockMutex
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
void lock()Lock the mutex (BasicLockable interface for std::lock_guard / std::unique_lock).
try_lock
bool try_lock()Returns true if the mutex was acquired without blocking (Lockable interface).
unlockMutex
void unlockMutex()Unlock the mutex locked by lockMutex(). Same as unlock().
unlock
void unlock()Unlock the mutex (BasicLockable interface).
Public attributes
color
raisim::Vec<4> colorOverride color for the entire visualized system (RGBA).
obj
ArticulatedSystem objArticulated system used for visualization only.