Go to the documentation of this file.
28 #include <Eigen/Geometry>
31 #include <ArmarXSimulation/interface/simulator/SimulatorInterface.h>
59 void actuateRobotJoints(
const std::string& robotName,
const std::map< std::string, float>& angles,
const std::map< std::string, float>& velocities)
override;
60 void actuateRobotJointsPos(
const std::string& robotName,
const std::map< std::string, float>& angles)
override;
61 void actuateRobotJointsVel(
const std::string& robotName,
const std::map< std::string, float>& velocities)
override;
65 void applyForceRobotNode(
const std::string& robotName,
const std::string& robotNodeName,
const Eigen::Vector3f& force)
override;
66 void applyTorqueRobotNode(
const std::string& robotName,
const std::string& robotNodeName,
const Eigen::Vector3f& torque)
override;
68 void applyForceObject(
const std::string& objectName,
const Eigen::Vector3f& force)
override;
69 void applyTorqueObject(
const std::string& objectName,
const Eigen::Vector3f& torque)
override;
71 bool hasObject(
const std::string& instanceName)
override;
74 bool hasRobot(
const std::string& robotName)
override;
75 bool hasRobotNode(
const std::string& robotName,
const std::string& robotNodeName)
override;
76 float getRobotMass(
const std::string& robotName)
override;
79 float getRobotJointAngle(
const std::string& robotName,
const std::string& nodeName)
override;
89 float getRobotMaxTorque(
const std::string& robotName,
const std::string& nodeName)
override;
90 void setRobotMaxTorque(
const std::string& robotName,
const std::string& nodeName,
float maxTorque)
override;
94 Eigen::Vector3f
getRobotLinearVelocity(
const std::string& robotName,
const std::string& nodeName)
override;
98 void setRobotLinearVelocity(
const std::string& robotName,
const std::string& robotNodeName,
const Eigen::Vector3f& vel)
override;
99 void setRobotAngularVelocity(
const std::string& robotName,
const std::string& robotNodeName,
const Eigen::Vector3f& vel)
override;
106 std::map<std::string, VirtualRobot::RobotPtr>
getRobots()
override;
108 std::vector<VirtualRobot::SceneObjectPtr>
getObjects()
override;
110 std::vector<SimDynamics::DynamicsEngine::DynamicsContactInfo>
copyContacts()
override;
134 void enableLogging(
const std::string& robotName,
const std::string& logFile)
override;
136 armarx::DistanceInfo
getRobotNodeDistance(
const std::string& robotName,
const std::string& robotNodeName1,
const std::string& robotNodeName2)
override;
137 armarx::DistanceInfo
getDistance(
const std::string& robotName,
const std::string& robotNodeName,
const std::string& worldObjectName)
override;
142 void setRobotNodeSimType(
const std::string& robotName,
const std::string& robotNodeName, VirtualRobot::SceneObject::Physics::SimulationType simType)
override;
143 void setObjectSimType(
const std::string& objectName, VirtualRobot::SceneObject::Physics::SimulationType simType)
override;
151 bool objectGraspedEngine(
const std::string& robotName,
const std::string& robotNodeName,
const std::string& objectName,
Eigen::Matrix4f& storeLocalTransform)
override;
154 bool objectReleasedEngine(
const std::string& robotName,
const std::string& robotNodeName,
const std::string& objectName)
override;
159 void setupFloorEngine(
bool enable,
const std::string& floorTexture)
override;
167 Eigen::Vector3f& linearVelocity,
168 Eigen::Vector3f& angularVelocity)
override;
210 virtual void createFloorPlane(
const Eigen::Vector3f& pos,
const Eigen::Vector3f& up);
216 bool synchronizeRobotNodePoses(
const std::string& robotName, std::map<std::string, armarx::PoseBasePtr>& objMap)
override;
std::map< std::string, float > getRobotJointTorques(const std::string &) override
~KinematicsWorld() override
float getRobotJointLimitLo(const std::string &robotName, const std::string &nodeName) override
virtual void initialize(int stepSizeMS, float maxRealTimeSimSpeed=1, bool floorPlane=false, std::string floorTexture=std::string())
std::map< std::string, VirtualRobot::RobotPtr > getRobots() override
virtual void createFloorPlane(const Eigen::Vector3f &pos, const Eigen::Vector3f &up)
void setRobotAngularVelocity(const std::string &robotName, const std::string &robotNodeName, const Eigen::Vector3f &vel) override
std::map< VirtualRobot::RobotNodePtr, std::pair< IceUtil::Time, float > > jointAngleDerivationFilters
std::vector< std::string > getObstacleNames() override
float getDeltaTimeMilli()
virtual VirtualRobot::SceneObjectPtr getObject(const std::string &objectName)
bool hasRobot(const std::string &robotName) override
VirtualRobot::SceneObjectPtr getFloor() override
void applyForceObject(const std::string &objectName, const Eigen::Vector3f &force) override
void setObjectPose(const std::string &objectName, const Eigen::Matrix4f &globalPose) override
std::shared_ptr< KinematicsWorld > KinematicsWorldPtr
std::vector< VirtualRobot::SceneObjectPtr > kinematicObjects
FramedPosePtr toFramedPose(const Eigen::Matrix4f &globalPose, const std::string &robotName, const std::string &frameName) override
toFramedPose Constructs a framed pose
void setObjectSimType(const std::string &objectName, VirtualRobot::SceneObject::Physics::SimulationType simType) override
void enableLogging(const std::string &robotName, const std::string &logFile) override
std::vector< std::string > getRobotNames() override
void setRobotLinearVelocityRobotRootFrame(const std::string &robotName, const std::string &robotNodeName, const Eigen::Vector3f &vel) override
std::map< std::string, float > getRobotJointVelocities(const std::string &robotName) override
float getRobotJointVelocity(const std::string &robotName, const std::string &nodeName) override
float maxRealTimeSimSpeed
void stepStaticRobots(double deltaInSeconds)
bool objectReleasedEngine(const std::string &robotName, const std::string &robotNodeName, const std::string &objectName) override
remove a joint
void applyTorqueRobotNode(const std::string &robotName, const std::string &robotNodeName, const Eigen::Vector3f &torque) override
bool hasObject(const std::string &instanceName) override
The SimulatedWorld class encapsulates the whole physics simulation and the corresponding data.
void stepPhysicsFixedTimeStep() override
Perform one simulation step.
std::map< std::string, float > actualVelocities
Eigen::Vector3f velRotActual
float getRobotMaxTorque(const std::string &robotName, const std::string &nodeName) override
std::map< VirtualRobot::RobotPtr, std::pair< IceUtil::Time, Eigen::Matrix4f > > angularVelocityFilters
void actuateRobotJointsVel(const std::string &robotName, const std::map< std::string, float > &velocities) override
void applyForceRobotNode(const std::string &robotName, const std::string &robotNodeName, const Eigen::Vector3f &force) override
void actuateRobotJoints(const std::string &robotName, const std::map< std::string, float > &angles, const std::map< std::string, float > &velocities) override
ignoring velocity target
std::vector< SimDynamics::DynamicsEngine::DynamicsContactInfo > copyContacts() override
armarx::DistanceInfo getDistance(const std::string &robotName, const std::string &robotNodeName, const std::string &worldObjectName) override
bool objectGraspedEngine(const std::string &robotName, const std::string &robotNodeName, const std::string &objectName, Eigen::Matrix4f &storeLocalTransform) override
create a joint
bool removeObstacleEngine(const std::string &name) override
bool updateForceTorqueSensor(ForceTorqueInfo &ftInfo) override
bool synchronizeSimulationDataEngine() override
Eigen::Vector3f velTransActual
Eigen::Matrix4f getRobotNodePose(const std::string &robotName, const std::string &robotNodeName) override
Eigen::Matrix4f getObjectPose(const std::string &objectName) override
std::map< std::string, float > getRobotJointAngles(const std::string &robotName) override
armarx::DistanceInfo getRobotNodeDistance(const std::string &robotName, const std::string &robotNodeName1, const std::string &robotNodeName2) override
bool hasRobotNode(const std::string &robotName, const std::string &robotNodeName) override
bool addRobotEngine(VirtualRobot::RobotPtr robot, double pid_p, double pid_i, double pid_d, const std::string &filename, bool staticRobot, bool selfCollisions) override
Eigen::Vector3f velTransTarget
void calculateActualVelocities()
std::map< std::string, KinematicRobotInfo > kinematicRobots
const KinematicUnitDatafieldCreator jointVelocities("jointVelocities")
std::vector< VirtualRobot::SceneObjectPtr > getObjects() override
VirtualRobot::SceneObjectPtr floor
bool synchronizeRobotNodePoses(const std::string &robotName, std::map< std::string, armarx::PoseBasePtr > &objMap) override
ForceTorqueDataSeq getRobotForceTorqueSensors(const std::string &) override
VirtualRobot::ObstaclePtr groundObject
armarx::core::time::DateTime Time
Eigen::Vector3f velRotTarget
void stepStaticObjects(double deltaInSeconds)
const KinematicUnitDatafieldCreator jointAngles("jointAngles")
Eigen::Vector3f getRobotAngularVelocity(const std::string &robotName, const std::string &nodeName) override
void setupFloorEngine(bool enable, const std::string &floorTexture) override
MatrixXX< 4, 4, float > Matrix4f
void actuateRobotJointsTorque(const std::string &robotName, const std::map< std::string, float > &torques) override
VirtualRobot::RobotPtr getRobot(const std::string &robotName) override
The KinematicsWorld class encapsulates the kinemtics simulation and the corresponding data....
Eigen::Matrix4f getRobotPose(const std::string &robotName) override
float getRobotJointAngle(const std::string &robotName, const std::string &nodeName) override
void setRobotMaxTorque(const std::string &robotName, const std::string &nodeName, float maxTorque) override
void setRobotLinearVelocity(const std::string &robotName, const std::string &robotNodeName, const Eigen::Vector3f &vel) override
boost::intrusive_ptr< SceneObject > SceneObjectPtr
int getFixedTimeStepMS() override
void setRobotAngularVelocityRobotRootFrame(const std::string &robotName, const std::string &robotNodeName, const Eigen::Vector3f &vel) override
void stepPhysicsRealTime() override
Perform one simulation step.
void setRobotNodeSimType(const std::string &robotName, const std::string &robotNodeName, VirtualRobot::SceneObject::Physics::SimulationType simType) override
float getRobotJointLimitHi(const std::string &robotName, const std::string &nodeName) override
std::map< VirtualRobot::RobotPtr, std::pair< IceUtil::Time, Eigen::Vector3f > > linearVelocityFilters
void applyTorqueObject(const std::string &objectName, const Eigen::Vector3f &torque) override
VirtualRobot::RobotPtr robot
const KinematicUnitDatafieldCreator jointTorques("jointTorques")
bool getRobotStatus(const std::string &robotName, NameValueMap &jointAngles, NameValueMap &jointVelocities, NameValueMap &jointTorques, Eigen::Vector3f &linearVelocity, Eigen::Vector3f &angularVelocity) override
bool synchronizeSceneObjectPoses(VirtualRobot::SceneObjectPtr currentObjEngine, std::map< std::string, armarx::PoseBasePtr > &objMap) override
Eigen::Vector3f getRobotLinearVelocity(const std::string &robotName, const std::string &nodeName) override
float getRobotMass(const std::string &robotName) override
This file offers overloads of toIce() and fromIce() functions for STL container types.
void setRobotPose(const std::string &robotName, const Eigen::Matrix4f &globalPose) override
bool synchronizeObjects() override
std::shared_ptr< class Robot > RobotPtr
bool removeRobotEngine(const std::string &robotName) override
void actuateRobotJointsPos(const std::string &robotName, const std::map< std::string, float > &angles) override
std::map< std::string, float > targetVelocities
bool addObstacleEngine(VirtualRobot::SceneObjectPtr o, VirtualRobot::SceneObject::Physics::SimulationType simType) override