Privacy
An open-source, flexible 3D physical simulation framework
mars::interfaces::JointManagerInterface Class Referenceabstract

Interface class for the node organization. More...

#include <JointManagerInterface.h>

Public Member Functions

virtual ~JointManagerInterface ()
 
virtual unsigned long addJoint (JointData *jointS, bool reload=false)=0
 Add a joint to the joint pool of the simulation. More...
 
virtual int getJointCount ()=0
 Returns the number of joints added to the simulation. More...
 
virtual void editJoint (JointData *jointS)=0
 Change a Joint. More...
 
virtual void getListJoints (std::vector< core_objects_exchange > *jointList)=0
 Fills a list of core_object_exchange objects with joint informations. More...
 
virtual void getJointExchange (unsigned long id, core_objects_exchange *obj)=0
 Fills one core_object_exchange object with joint information of the joint with the given id. More...
 
virtual const JointData getFullJoint (unsigned long index)=0
 get the full struct of a joint for editing purposes. More...
 
virtual void removeJoint (unsigned long id)=0
 Removes the joint with the given id. More...
 
virtual void removeJointByIDs (unsigned long id1, unsigned long id2)=0
 removes the joint connecting the two nodes with the given ids More...
 
virtual sim::SimJointgetSimJoint (unsigned long id)=0
 Returns a pointer to the SimJoint Object. More...
 
virtual std::vector< sim::SimJoint * > getSimJoints (void)=0
 Return a copy of the SimJointVector;. More...
 
virtual void reattacheJoints (unsigned long node_id)=0
 Reattaches the joints that are connected to the node with id node_id. More...
 
virtual void reloadJoints (void)=0
 Reloads all joints in the simulation. More...
 
virtual void updateJoints (sReal calc_ms)=0
 Update the Joint values from the physics. More...
 
virtual void clearAllJoints (bool clear_all=false)=0
 Removes all joints from the simulation to clear the world. More...
 
virtual void setReloadJointOffset (unsigned long id, sReal offset)=0
 Set a new joint offset for reloading a joint. More...
 
virtual void setReloadJointAxis (unsigned long id, const utils::Vector &axis)=0
 Set a new axis for reloading a joint. More...
 
virtual void scaleReloadJoints (sReal x, sReal y, sReal z)=0
 
virtual void setJointTorque (unsigned long id, sReal torque)=0
 
virtual void changeStepSize (void)=0
 
virtual void setReloadAnchor (unsigned long id, const utils::Vector &anchor)=0
 
virtual void setSDParams (unsigned long id, JointData *sJoint)=0
 
virtual void setVelocity (unsigned long id, sReal velocity)=0
 sets the velocity of the first axis of the joint More...
 
virtual void setVelocity2 (unsigned long id, sReal velocity)=0
 sets the velocity of the second axis of the joint More...
 
virtual void setForceLimit (unsigned long id, sReal max_force, bool first_axis=1)=0
 
virtual unsigned long getID (const std::string &joint_name) const =0
 Retrieve the id of a joint by name. More...
 
virtual bool getDataBrokerNames (unsigned long id, std::string *groupName, std::string *dataName) const =0
 Retrieves the groupName and dataName under which the joint with the specified id publishes its data in the DataBroker. More...
 
virtual void setOfflineValue (unsigned long id, sReal value)=0
 
virtual interfaces::sReal getLowStop (unsigned long id) const =0
 
virtual interfaces::sReal getHighStop (unsigned long id) const =0
 
virtual interfaces::sReal getLowStop2 (unsigned long id) const =0
 
virtual interfaces::sReal getHighStop2 (unsigned long id) const =0
 
virtual void setLowStop (unsigned long id, interfaces::sReal lowStop)=0
 
virtual void setHighStop (unsigned long id, interfaces::sReal highStop)=0
 
virtual void setLowStop2 (unsigned long id, interfaces::sReal lowStop2)=0
 
virtual void setHighStop2 (unsigned long id, interfaces::sReal highStop2)=0
 
virtual void edit (interfaces::JointId id, const std::string &key, const std::string &value)=0
 

Detailed Description

Interface class for the node organization.

Definition at line 52 of file JointManagerInterface.h.

Constructor & Destructor Documentation

◆ ~JointManagerInterface()

virtual mars::interfaces::JointManagerInterface::~JointManagerInterface ( )
inlinevirtual

Definition at line 54 of file JointManagerInterface.h.

Member Function Documentation

◆ addJoint()

virtual unsigned long mars::interfaces::JointManagerInterface::addJoint ( JointData jointS,
bool  reload = false 
)
pure virtual

Add a joint to the joint pool of the simulation.

It is very important to assure the serialization between the threads to have the desired results.

pre:

Implemented in mars::sim::JointManager.

◆ changeStepSize()

virtual void mars::interfaces::JointManagerInterface::changeStepSize ( void  )
pure virtual

Implemented in mars::sim::JointManager.

◆ clearAllJoints()

virtual void mars::interfaces::JointManagerInterface::clearAllJoints ( bool  clear_all = false)
pure virtual

Removes all joints from the simulation to clear the world.

Implemented in mars::sim::JointManager.

◆ edit()

virtual void mars::interfaces::JointManagerInterface::edit ( interfaces::JointId  id,
const std::string &  key,
const std::string &  value 
)
pure virtual

Implemented in mars::sim::JointManager.

◆ editJoint()

virtual void mars::interfaces::JointManagerInterface::editJoint ( JointData jointS)
pure virtual

Change a Joint.

The simulation must be updated in here.

Implemented in mars::sim::JointManager.

◆ getDataBrokerNames()

virtual bool mars::interfaces::JointManagerInterface::getDataBrokerNames ( unsigned long  id,
std::string *  groupName,
std::string *  dataName 
) const
pure virtual

Retrieves the groupName and dataName under which the joint with the specified id publishes its data in the DataBroker.

Returns
true if the names were successfully retrieved. false if no joint with the given id exists.

Implemented in mars::sim::JointManager.

◆ getFullJoint()

virtual const JointData mars::interfaces::JointManagerInterface::getFullJoint ( unsigned long  index)
pure virtual

get the full struct of a joint for editing purposes.

Exceptions
std::runtime_errorif the joint cannot be found

Implemented in mars::sim::JointManager.

◆ getHighStop()

virtual interfaces::sReal mars::interfaces::JointManagerInterface::getHighStop ( unsigned long  id) const
pure virtual

Implemented in mars::sim::JointManager.

◆ getHighStop2()

virtual interfaces::sReal mars::interfaces::JointManagerInterface::getHighStop2 ( unsigned long  id) const
pure virtual

Implemented in mars::sim::JointManager.

◆ getID()

virtual unsigned long mars::interfaces::JointManagerInterface::getID ( const std::string &  joint_name) const
pure virtual

Retrieve the id of a joint by name.

Parameters
joint_nameName of the joint to get the id for
Returns
Id of the joint if it exists, otherwise 0

Implemented in mars::sim::JointManager.

◆ getJointCount()

virtual int mars::interfaces::JointManagerInterface::getJointCount ( )
pure virtual

Returns the number of joints added to the simulation.

Implemented in mars::sim::JointManager.

◆ getJointExchange()

virtual void mars::interfaces::JointManagerInterface::getJointExchange ( unsigned long  id,
core_objects_exchange obj 
)
pure virtual

Fills one core_object_exchange object with joint information of the joint with the given id.

Implemented in mars::sim::JointManager.

◆ getListJoints()

virtual void mars::interfaces::JointManagerInterface::getListJoints ( std::vector< core_objects_exchange > *  jointList)
pure virtual

Fills a list of core_object_exchange objects with joint informations.

Implemented in mars::sim::JointManager.

◆ getLowStop()

virtual interfaces::sReal mars::interfaces::JointManagerInterface::getLowStop ( unsigned long  id) const
pure virtual

Implemented in mars::sim::JointManager.

◆ getLowStop2()

virtual interfaces::sReal mars::interfaces::JointManagerInterface::getLowStop2 ( unsigned long  id) const
pure virtual

Implemented in mars::sim::JointManager.

◆ getSimJoint()

virtual sim::SimJoint* mars::interfaces::JointManagerInterface::getSimJoint ( unsigned long  id)
pure virtual

Returns a pointer to the SimJoint Object.

Implemented in mars::sim::JointManager.

◆ getSimJoints()

virtual std::vector<sim::SimJoint*> mars::interfaces::JointManagerInterface::getSimJoints ( void  )
pure virtual

Return a copy of the SimJointVector;.

Implemented in mars::sim::JointManager.

◆ reattacheJoints()

virtual void mars::interfaces::JointManagerInterface::reattacheJoints ( unsigned long  node_id)
pure virtual

Reattaches the joints that are connected to the node with id node_id.

Implemented in mars::sim::JointManager.

◆ reloadJoints()

virtual void mars::interfaces::JointManagerInterface::reloadJoints ( void  )
pure virtual

Reloads all joints in the simulation.

Implemented in mars::sim::JointManager.

◆ removeJoint()

virtual void mars::interfaces::JointManagerInterface::removeJoint ( unsigned long  id)
pure virtual

Removes the joint with the given id.

Implemented in mars::sim::JointManager.

◆ removeJointByIDs()

virtual void mars::interfaces::JointManagerInterface::removeJointByIDs ( unsigned long  id1,
unsigned long  id2 
)
pure virtual

removes the joint connecting the two nodes with the given ids

Parameters
id1the id of one of the nodes attached to the joint to be removed
id2the id of the other node attached to the joint to be removed

Implemented in mars::sim::JointManager.

◆ scaleReloadJoints()

virtual void mars::interfaces::JointManagerInterface::scaleReloadJoints ( sReal  x,
sReal  y,
sReal  z 
)
pure virtual

Implemented in mars::sim::JointManager.

◆ setForceLimit()

virtual void mars::interfaces::JointManagerInterface::setForceLimit ( unsigned long  id,
sReal  max_force,
bool  first_axis = 1 
)
pure virtual

Implemented in mars::sim::JointManager.

◆ setHighStop()

virtual void mars::interfaces::JointManagerInterface::setHighStop ( unsigned long  id,
interfaces::sReal  highStop 
)
pure virtual

Implemented in mars::sim::JointManager.

◆ setHighStop2()

virtual void mars::interfaces::JointManagerInterface::setHighStop2 ( unsigned long  id,
interfaces::sReal  highStop2 
)
pure virtual

Implemented in mars::sim::JointManager.

◆ setJointTorque()

virtual void mars::interfaces::JointManagerInterface::setJointTorque ( unsigned long  id,
sReal  torque 
)
pure virtual

Implemented in mars::sim::JointManager.

◆ setLowStop()

virtual void mars::interfaces::JointManagerInterface::setLowStop ( unsigned long  id,
interfaces::sReal  lowStop 
)
pure virtual

Implemented in mars::sim::JointManager.

◆ setLowStop2()

virtual void mars::interfaces::JointManagerInterface::setLowStop2 ( unsigned long  id,
interfaces::sReal  lowStop2 
)
pure virtual

Implemented in mars::sim::JointManager.

◆ setOfflineValue()

virtual void mars::interfaces::JointManagerInterface::setOfflineValue ( unsigned long  id,
sReal  value 
)
pure virtual

Implemented in mars::sim::JointManager.

◆ setReloadAnchor()

virtual void mars::interfaces::JointManagerInterface::setReloadAnchor ( unsigned long  id,
const utils::Vector anchor 
)
pure virtual

Implemented in mars::sim::JointManager.

◆ setReloadJointAxis()

virtual void mars::interfaces::JointManagerInterface::setReloadJointAxis ( unsigned long  id,
const utils::Vector axis 
)
pure virtual

Set a new axis for reloading a joint.

Implemented in mars::sim::JointManager.

◆ setReloadJointOffset()

virtual void mars::interfaces::JointManagerInterface::setReloadJointOffset ( unsigned long  id,
sReal  offset 
)
pure virtual

Set a new joint offset for reloading a joint.

Implemented in mars::sim::JointManager.

◆ setSDParams()

virtual void mars::interfaces::JointManagerInterface::setSDParams ( unsigned long  id,
JointData sJoint 
)
pure virtual

Implemented in mars::sim::JointManager.

◆ setVelocity()

virtual void mars::interfaces::JointManagerInterface::setVelocity ( unsigned long  id,
sReal  velocity 
)
pure virtual

sets the velocity of the first axis of the joint

Parameters
idthe id of the joint whos velocity should be set
thenew velocity

Implemented in mars::sim::JointManager.

◆ setVelocity2()

virtual void mars::interfaces::JointManagerInterface::setVelocity2 ( unsigned long  id,
sReal  velocity 
)
pure virtual

sets the velocity of the second axis of the joint

Parameters
idthe id of the joint whos velocity should be set
thenew velocity If the joint has no second axis the behaviour is undefined.

Implemented in mars::sim::JointManager.

◆ updateJoints()

virtual void mars::interfaces::JointManagerInterface::updateJoints ( sReal  calc_ms)
pure virtual

Update the Joint values from the physics.

Implemented in mars::sim::JointManager.


The documentation for this class was generated from the following file: