|
Use the following code if you want to convert from an armarx::Pose, an armarx::FramedPose or an armarx::LinkedPose. Refer to Intelligent Coordinates for further information.
Use the following code if you want to convert from armarx::FramedPosition and armarx::FramedOrientation. Refer to Intelligent Coordinates for further information.
Refer to Intelligent Coordinates.
The RobotState component serves as a central component for storing all robot related data. For now this data covers the current joint angles of the robot.
The RobotStateComponent implements a KinematicUnitListener, hence it reacts on all joint updates that are reported by a KinematicUnit component. An exemplary startup script could look like this
With the corresponding configuration in ./config/Armar3Config.cfg:
Robots are usually defined in the Simox XML (https://git.h2t.iar.kit.edu/sw/simox/simox/-/wikis/FileFormat) or in the URDF format. To inspect the kinematic structure, visualizations and physical properties, you can use the RobotViewer tool which is part of the Simox library. In particlular you can visualize all coordinate frames that are present in the robot defintion. Start it with the following command:
The RobotStateComponent provides several methods for accessing the current configuration of the robot and for getting a snapshot of the current state which is compatible with models of the Simox/VirtualRobot framework. With these models the whole functionality of Simox (https://git.h2t.iar.kit.edu/sw/simox/simox) can be used, e.g. IK solving, collision detection or motion and grasp planning.
See also Remote Robot State.
A RemoteRobot is a synchronized robot data structure which always represents the current state of the robot. Be aware, that any operations on this model (e.g. IK solving) may take long (e.g. 100 ms) due to the heavy network communication overhead. For complex operations it is suggested to create a local clone of the data structure and to synchronize this clone before working with it (see below).
The Remote Robot can be created by getting the proxy to the RobotStateComponent and grabbing a RemoteRobot:
The remoteRobot object can now be accessed in order to get joint angles or to convert cooridnate frames.
When complex operations should be performed on a robot model the use of a RemoteRobot could slow down the computation since each joint access induces a network transfer. Hence the RemoteRobot offers a method to create a local copy of the remote data.
If only the structure of the robot is needed (without 3D models, useful e.g. for kinematic calculations, coorinate transformations, etc), the following method can be used to create a local clone of the robot:
The robot instance can be manually synchronized with the remote data structure (i.e. copy the joint angle values) by calling:
If a complete robot model (including 3d models) is needed, you can pass a filename to a local file to allow the system to load the complete robot:
This model can be synchronized in the same way as the first model.
You can use the component MemoryToDebugObserver to query data from memory servers and send them to the DebugObserver. These values can then be viewed using the ObserverGui or the Live Plotter.
To use this functionality in your own code, use the class armarx::armem::client::util::MemoryToDebugObserver.