---
title: "Motion: read the position and move the robot"
description: "Read the position, the kinematics, the frames and the kinematic model of a robot and move it to a joint or Cartesian target with robot.Motion. Safety, brand support table, C# and Python examples."
---

# Motion: read the position and move the robot

`robot.Motion` reads the position of a robot, computes its kinematics, reads the frames, the tools and the kinematic model, and moves the robot to a joint or Cartesian target. The result types are the same on every brand. The methods that you can call depend on the brand: see the table below. The units are mm and degrees. The motion groups are numbered from 1, and the group 1 is the default.

## Prerequisites

- A connected `RobotController`. See [Connect to your robot](/robotics/documentation/connect).
- The license of the brand of the controller, or the 30 day trial. See [Licensing](/robotics/documentation/license).
- For the moves: the servo power, see [State](/robotics/documentation/state), and a controller that accepts remote motion. A controller can need its automatic or remote mode.
- For the moves: a route that is enabled. For example on Fanuc, the only route of the moves takes the motion control of the controller. The library never opens such a route by itself: it is marked (manual) in the table below, and you enable it in the connection parameters of the brand. Until then, the call throws `RouteUnavailableException`, and its message says what to enable. See [Routing](/robotics/documentation/routing).

## Safety

The moves move the robot. A robot is dangerous machinery. Test your code on a simulator or an emulator first, then on the real robot with low speeds and a person at the emergency stop. The safety of the controller applies as for any remote command. `StopMotion` does not replace the emergency stop. The SDK does not replace a safety system: see the [Legal notice](/robotics/documentation/credits).

## Brand support

Each cell gives the protocol that the method uses on this brand, in the default order. The page [Routing](/robotics/documentation/routing) explains how the library chooses it. The table is generated from the route data of the library. (manual) marks a route that you enable yourself. "n of m" is the number of methods of the service that have a route on this brand.

Routes of each method in the default order. The first route is used, the next ones are fallbacks. (manual) marks a route that you enable yourself.

| Method | Fanuc | Yaskawa | Universal Robots | ABB | Stäubli |
| --- | --- | --- | --- | --- | --- |
| Motion.ReadPose | SNPX, CGTP (Cgtp), RMI (manual), FTP | High Speed Ethernet Server, Ethernet Server | RTDE, Primary Interface (Primary) | Robot Web Services | SOAP |
| Motion.ReadJoints | SNPX, CGTP (Cgtp), RMI (manual), FTP | Not available | RTDE, Primary Interface (Primary) | Robot Web Services | SOAP |
| Motion.ForwardKinematics | CGTP (Cgtp) | Not available | Primary Interface (Primary) | Robot Web Services | SOAP |
| Motion.InverseKinematics | CGTP (Cgtp) | Not available | Primary Interface (Primary) | Robot Web Services | SOAP |
| Motion.ReadUserFrame | RMI (manual) | Not available | Not available | Not available | Not available |
| Motion.ReadTool | RMI (manual) | Not available | Not available | Not available | Not available |
| Motion.MoveJoint | RMI (manual) | Not available | Primary Interface (Script), Interpreter Mode (manual) | Robot Web Services | SOAP |
| Motion.MoveJointToPose | RMI (manual) | High Speed Ethernet Server, Ethernet Server | Primary Interface (Script), Interpreter Mode (manual) | Robot Web Services | SOAP |
| Motion.MoveLinear | RMI (manual) | High Speed Ethernet Server, Ethernet Server | Primary Interface (Script), Interpreter Mode (manual) | Robot Web Services | SOAP |
| Motion.MoveLinearToJoints | RMI (manual) | Not available | Primary Interface (Script), Interpreter Mode (manual) | Robot Web Services | SOAP |
| Motion.StopMotion | RMI (manual) | High Speed Ethernet Server, Ethernet Server | Primary Interface (Script), Dashboard Server | Robot Web Services | SOAP |
| Motion.WaitForMotionEnd | RMI (manual) | High Speed Ethernet Server, Ethernet Server | Dashboard Server, Primary Interface (Primary) | Robot Web Services | Not available |
| Motion.ForwardKinematicsInFrame | CGTP (Cgtp) | Not available | Not available | Not available | Not available |
| Motion.ReadKinematicModel | FTP | High Speed Ethernet Server | Not available | Not available | Not available |
| Motion | **14 of 14** | **6 of 14** | **10 of 14** | **10 of 14** | **9 of 14** |

A brand that has no route for a method throws `FeatureNotSupportedException` (see [Errors](/robotics/documentation/errors)). Ask `robot.Motion.IsAvailable(MotionFeature.MoveLinear)` before the call. `IsAvailable` is false for a method whose routes are all disabled or did not answer.

## Example

### Read the position

`ReadPose` returns a `RobotPosition`: the Cartesian pose of the tool center point with its configuration, frame, tool and group, and the joints when the controller gives them. `ReadJoints` returns the joint position. A position that you read can be given back as a target as it is.

**C# : MotionReadPose**
```csharp
using UnderAutomation.Robotics.Controllers;
using UnderAutomation.Robotics.Geometry;

public class MotionReadPose
{
    static void Main()
    {
        RobotController robot = new RobotController();
        robot.Connect(RobotConnectionParameters.Create("fanuc", "192.168.0.1"));

        /**/
        // Group 1 by default
        RobotPosition pose = robot.Motion.ReadPose();
        Console.WriteLine($"X {pose.Pose.X}, Y {pose.Pose.Y}, Z {pose.Pose.Z}");

        JointValues joints = robot.Motion.ReadJoints();
        Console.WriteLine(string.Join(", ", joints.Values));
        /**/

        robot.Disconnect();
    }
}
```

**Python : MotionReadPose**
```python
from underautomation.robotics.controllers.robot_controller import RobotController
from underautomation.robotics.controllers.robot_connection_parameters import RobotConnectionParameters

robot = RobotController()
robot.connect(RobotConnectionParameters.create("fanuc", "192.168.0.1", ""))

##
# Group 1 by default
pose = robot.motion.read_pose()
print(f"X {pose.pose.x}, Y {pose.pose.y}, Z {pose.pose.z}")

joints = robot.motion.read_joints()
print(", ".join(str(value) for value in joints.values))
##

robot.disconnect()
```

**Matlab : MotionReadPose**
```matlab
NET.addAssembly(fullfile(pwd, 'net48', 'UnderAutomation.Robotics.dll'));
import UnderAutomation.Robotics.Controllers.*

robot = RobotController();
robot.Connect(RobotConnectionParameters.Create('fanuc', '192.168.0.1', ''));

%%
% Motion group 1: Matlab passes every argument, also the optional ones
position = robot.Motion.ReadPose(int32(1));
pose = position.Pose;
fprintf('X %.3f, Y %.3f, Z %.3f\n', pose.X, pose.Y, pose.Z);

% Values is a .NET array: double() converts it to a Matlab vector
joints = robot.Motion.ReadJoints(int32(1));
disp(double(joints.Values));
%%

robot.Disconnect();
```

### Compute the kinematics

`ForwardKinematics` computes the Cartesian position of a joint position, and `InverseKinematics` the joint position of a Cartesian position, with the configuration, frame, tool and group of the position. The frame and the tool of the forward computation depend on the brand: `Frame` and `Tool` of the result give them, and -1 means the ones active on the controller.

**C# : MotionKinematics**
```csharp
using UnderAutomation.Robotics.Controllers;
using UnderAutomation.Robotics.Geometry;

public class MotionKinematics
{
    static void Main()
    {
        RobotController robot = new RobotController();
        robot.Connect(RobotConnectionParameters.Create("fanuc", "192.168.0.1"));

        /**/
        // Joint values to a position
        RobotPosition position = robot.Motion.ForwardKinematics(new JointValues(0, 0, 0, 0, -90, 0));
        Console.WriteLine($"X {position.Pose.X}, Y {position.Pose.Y}, Z {position.Pose.Z}");

        // Position to joint values
        JointValues joints = robot.Motion.InverseKinematics(position);
        Console.WriteLine(string.Join(", ", joints.Values));
        /**/

        robot.Disconnect();
    }
}
```

**Python : MotionKinematics**
```python
from underautomation.robotics.controllers.robot_controller import RobotController
from underautomation.robotics.controllers.robot_connection_parameters import RobotConnectionParameters
from underautomation.robotics.geometry.joint_values import JointValues

robot = RobotController()
robot.connect(RobotConnectionParameters.create("fanuc", "192.168.0.1", ""))

##
# Joint values to a position
position = robot.motion.forward_kinematics(JointValues([0, 0, 0, 0, -90, 0]))
print(f"X {position.pose.x}, Y {position.pose.y}, Z {position.pose.z}")

# Position to joint values
joints = robot.motion.inverse_kinematics(position)
print(", ".join(str(value) for value in joints.values))
##

robot.disconnect()
```

### Read the frames and the tools

`ReadUserFrame` reads a user frame, expressed in the world frame of the motion group. `ReadTool` reads the pose of the tool center point in the flange frame. `ForwardKinematicsInFrame` computes a position in a frame and with a tool that you choose. For -1, it uses the frame and the tool active on the controller.

**C# : MotionFrames**
```csharp
using UnderAutomation.Robotics.Controllers;
using UnderAutomation.Robotics.Geometry;

public class MotionFrames
{
    static void Main()
    {
        RobotController robot = new RobotController();
        robot.Connect(RobotConnectionParameters.Create("fanuc", "192.168.0.1"));

        /**/
        // User frame 1 and tool 1
        CartesianPose frame = robot.Motion.ReadUserFrame(1);
        CartesianPose tool = robot.Motion.ReadTool(1);
        Console.WriteLine($"Frame 1: X {frame.X}, Y {frame.Y}, Z {frame.Z}");
        Console.WriteLine($"Tool 1: X {tool.X}, Y {tool.Y}, Z {tool.Z}");

        // Position of a joint set seen from a frame and a tool
        RobotPosition position = robot.Motion.ForwardKinematicsInFrame(robot.Motion.ReadJoints(), frame: 1, tool: 1);
        /**/

        robot.Disconnect();
    }
}
```

**Python : MotionFrames**
```python
from underautomation.robotics.controllers.robot_controller import RobotController
from underautomation.robotics.controllers.robot_connection_parameters import RobotConnectionParameters

robot = RobotController()
robot.connect(RobotConnectionParameters.create("fanuc", "192.168.0.1", ""))

##
# User frame 1 and tool 1
frame = robot.motion.read_user_frame(1)
tool = robot.motion.read_tool(1)
print(f"Frame 1: X {frame.x}, Y {frame.y}, Z {frame.z}")
print(f"Tool 1: X {tool.x}, Y {tool.y}, Z {tool.z}")

# Position of a joint set seen from a frame and a tool
position = robot.motion.forward_kinematics_in_frame(robot.motion.read_joints(), frame=1, tool=1)
##

robot.disconnect()
```

### Read the kinematic model

`ReadKinematicModel` reads the Denavit-Hartenberg values, the geometry and the model name of the arm of a motion group. It is read only. The values follow the convention of the brand: compare models of the same `Convention` only. A route can read some groups only: another group throws `ArgumentOutOfRangeException`. A group that is not a robot arm, or a model that the brand cannot read, throws `RobotControllerException`.

**C# : MotionKinematicModel**
```csharp
using UnderAutomation.Robotics.Controllers;

public class MotionKinematicModel
{
    static void Main()
    {
        RobotController robot = new RobotController();
        robot.Connect(RobotConnectionParameters.Create("fanuc", "192.168.0.1"));

        /**/
        // Fanuc and Yaskawa only: the other brands have no route for this method
        if (robot.Motion.IsAvailable(MotionFeature.ReadKinematicModel))
        {
            KinematicModel model = robot.Motion.ReadKinematicModel();
            Console.WriteLine($"{model.Model}: {model.Category}, A1 {model.A1}, A2 {model.A2}, A3 {model.A3}, D4 {model.D4}");
        }
        /**/

        robot.Disconnect();
    }
}
```

**Python : MotionKinematicModel**
```python
from underautomation.robotics.controllers.robot_controller import RobotController
from underautomation.robotics.controllers.robot_connection_parameters import RobotConnectionParameters
from underautomation.robotics.controllers.motion_feature import MotionFeature

robot = RobotController()
robot.connect(RobotConnectionParameters.create("fanuc", "192.168.0.1", ""))

##
# Fanuc and Yaskawa only: the other brands have no route for this method
if robot.motion.is_available(MotionFeature.ReadKinematicModel):
    model = robot.motion.read_kinematic_model()
    print(f"{model.model}: {model.category.name}, A1 {model.a1}, A2 {model.a2}, A3 {model.a3}, D4 {model.d4}")
##

robot.disconnect()
```

### Move to a joint position

`MoveJoint` moves to a joint position with a joint interpolation. The speed is a `MotionSpeed`: for a joint interpolation, `Percent` is the percentage of the maximum speed of the axes. The controller speed override applies on top. A move returns when the controller accepted the motion, without waiting for its end: `WaitForMotionEnd` waits for it.

**C# : MotionMoveJoint**
```csharp
using UnderAutomation.Robotics.Controllers;
using UnderAutomation.Robotics.Geometry;

public class MotionMoveJoint
{
    static void Main()
    {
        RobotController robot = new RobotController();
        robot.Connect(RobotConnectionParameters.Create("fanuc", "192.168.0.1"));

        /**/
        // Joint interpolation: 20 % of the maximum speed of the axes
        MotionSpeed speed = new MotionSpeed { Percent = 20 };

        robot.Motion.MoveJoint(new JointValues(0, 0, 0, 0, -90, 0), speed);
        robot.Motion.WaitForMotionEnd(30000);
        /**/

        robot.Disconnect();
    }
}
```

**Python : MotionMoveJoint**
```python
from underautomation.robotics.controllers.robot_controller import RobotController
from underautomation.robotics.controllers.robot_connection_parameters import RobotConnectionParameters
from underautomation.robotics.controllers.motion_speed import MotionSpeed
from underautomation.robotics.geometry.joint_values import JointValues

robot = RobotController()
robot.connect(RobotConnectionParameters.create("fanuc", "192.168.0.1", ""))

##
# Joint interpolation: 20 % of the maximum speed of the axes
speed = MotionSpeed()
speed.percent = 20

robot.motion.move_joint(JointValues([0, 0, 0, 0, -90, 0]), speed)
robot.motion.wait_for_motion_end(30000)
##

robot.disconnect()
```

### Move to a Cartesian position

`MoveJointToPose` moves to a Cartesian position with a joint interpolation. The configuration of the position chooses the joint solution. The example reads the current position, raises it by 50 mm and moves there.

**C# : MotionMoveJointToPose**
```csharp
using UnderAutomation.Robotics.Controllers;

public class MotionMoveJointToPose
{
    static void Main()
    {
        RobotController robot = new RobotController();
        robot.Connect(RobotConnectionParameters.Create("fanuc", "192.168.0.1"));

        /**/
        RobotPosition target = robot.Motion.ReadPose();
        target.Pose.Z += 50;

        // Joint interpolation to a Cartesian target
        robot.Motion.MoveJointToPose(target, new MotionSpeed { Percent = 20 });
        robot.Motion.WaitForMotionEnd(30000);
        /**/

        robot.Disconnect();
    }
}
```

**Python : MotionMoveJointToPose**
```python
from underautomation.robotics.controllers.robot_controller import RobotController
from underautomation.robotics.controllers.robot_connection_parameters import RobotConnectionParameters
from underautomation.robotics.controllers.motion_speed import MotionSpeed

robot = RobotController()
robot.connect(RobotConnectionParameters.create("fanuc", "192.168.0.1", ""))

##
target = robot.motion.read_pose()
target.pose.z += 50

# Joint interpolation to a Cartesian target
speed = MotionSpeed()
speed.percent = 20
robot.motion.move_joint_to_pose(target, speed)
robot.motion.wait_for_motion_end(30000)
##

robot.disconnect()
```

### Move along a line

`MoveLinear` moves the tool center point along a line to a Cartesian position, and `MoveLinearToJoints` does it to a joint position. The configuration cannot change along a line. For a linear interpolation, `Linear` of the `MotionSpeed` is the speed of the tool center point in mm/s.

**C# : MotionMoveLinear**
```csharp
using UnderAutomation.Robotics.Controllers;
using UnderAutomation.Robotics.Geometry;

public class MotionMoveLinear
{
    static void Main()
    {
        RobotController robot = new RobotController();
        robot.Connect(RobotConnectionParameters.Create("fanuc", "192.168.0.1"));

        /**/
        RobotPosition target = robot.Motion.ReadPose();
        target.Pose.Z += 50;

        // Linear interpolation: tool center point at 100 mm/s
        MotionSpeed speed = new MotionSpeed { Linear = 100 };

        robot.Motion.MoveLinear(target, speed);
        robot.Motion.WaitForMotionEnd(30000);

        // Same move to joint values
        robot.Motion.MoveLinearToJoints(new JointValues(0, 0, 0, 0, -90, 0), speed);
        /**/

        robot.Disconnect();
    }
}
```

**Python : MotionMoveLinear**
```python
from underautomation.robotics.controllers.robot_controller import RobotController
from underautomation.robotics.controllers.robot_connection_parameters import RobotConnectionParameters
from underautomation.robotics.controllers.motion_speed import MotionSpeed
from underautomation.robotics.geometry.joint_values import JointValues

robot = RobotController()
robot.connect(RobotConnectionParameters.create("fanuc", "192.168.0.1", ""))

##
target = robot.motion.read_pose()
target.pose.z += 50

# Linear interpolation: tool center point at 100 mm/s
speed = MotionSpeed()
speed.linear = 100

robot.motion.move_linear(target, speed)
robot.motion.wait_for_motion_end(30000)

# Same move to joint values
robot.motion.move_linear_to_joints(JointValues([0, 0, 0, 0, -90, 0]), speed)
##

robot.disconnect()
```

### Stop the motion

`StopMotion` stops a motion that was started by the moves of this service.

**C# : MotionStop**
```csharp
using UnderAutomation.Robotics.Controllers;

public class MotionStop
{
    static void Main()
    {
        RobotController robot = new RobotController();
        robot.Connect(RobotConnectionParameters.Create("fanuc", "192.168.0.1"));

        /**/
        robot.Motion.StopMotion();
        /**/

        robot.Disconnect();
    }
}
```

**Python : MotionStop**
```python
from underautomation.robotics.controllers.robot_controller import RobotController
from underautomation.robotics.controllers.robot_connection_parameters import RobotConnectionParameters

robot = RobotController()
robot.connect(RobotConnectionParameters.create("fanuc", "192.168.0.1", ""))

##
robot.motion.stop_motion()
##

robot.disconnect()
```

## Reference

In Python, the names are in snake_case: `robot.motion.read_pose()`, `robot.motion.move_linear(target, speed)`, `robot.motion.wait_for_motion_end(30000)`, `robot.motion.is_available(...)`. The enum members keep their names.

### Methods of IMotionService

**Members of Controllers.IMotionService**
```csharp
public interface IMotionService {
    // Computes the Cartesian position of a joint position.
    // The frame and the tool of the computation depend on the brand: <xref href="UnderAutomation.Robotics.Controllers.RobotPosition.Frame" data-throw-if-not-resolved="false"></xref> and <xref href="UnderAutomation.Robotics.Controllers.RobotPosition.Tool" data-throw-if-not-resolved="false"></xref> of the result give them (-1: the ones active on the controller).
    // <xref href="UnderAutomation.Robotics.Controllers.IMotionService.ForwardKinematicsInFrame(UnderAutomation.Robotics.Geometry.JointValues%2cSystem.Int32%2cSystem.Int32%2cSystem.Int32)" data-throw-if-not-resolved="false"></xref> chooses them.
    RobotPosition ForwardKinematics(JointValues joints, int group = 1)

    // Computes the Cartesian position of a joint position in a user frame and with a tool.
    // <xref href="UnderAutomation.Robotics.Controllers.RobotPosition.Frame" data-throw-if-not-resolved="false"></xref> and <xref href="UnderAutomation.Robotics.Controllers.RobotPosition.Tool" data-throw-if-not-resolved="false"></xref> of the result give the numbers of the frame and of the tool of the computation.
    // For -1, they are the numbers of the frame and of the tool active on the controller at the time of the call, or -1 when the controller does not give them.
    RobotPosition ForwardKinematicsInFrame(JointValues joints, int frame, int tool, int group = 1)

    // Computes the joint position of a Cartesian position, with the configuration, frame, tool and group of the position.
    // A frame or a tool of -1 is the one active on the controller.
    JointValues InverseKinematics(RobotPosition position)

    // Returns true when the method can be called on the connected controller.
    // The answer depends on the brand, on the routing settings and on the protocols that answered at the connection, not on the state of the controller.
    bool IsAvailable(MotionFeature feature)

    // Moves to a joint position with a joint interpolation
    void MoveJoint(JointValues target, MotionSpeed speed, int group = 1)

    // Moves to a Cartesian position with a joint interpolation. The configuration of the position chooses the joint solution.
    void MoveJointToPose(RobotPosition target, MotionSpeed speed)

    // Moves to a Cartesian position along a line of the tool center point. The configuration cannot change along a line.
    void MoveLinear(RobotPosition target, MotionSpeed speed)

    // Moves to a joint position along a line of the tool center point
    void MoveLinearToJoints(JointValues target, MotionSpeed speed, int group = 1)

    // Reads the current joint position of a motion group, in degrees (mm for linear axes)
    JointValues ReadJoints(int group = 1)

    // Reads the kinematic model of the robot arm of a motion group: its Denavit-Hartenberg values, its geometry and its model name.
    // Read only. A geometry that the brand does not classify gives <xref href="UnderAutomation.Robotics.Controllers.KinematicCategory.Unknown" data-throw-if-not-resolved="false"></xref> with its values.
    // A route can read some groups only: another group throws <xref href="System.ArgumentOutOfRangeException" data-throw-if-not-resolved="false"></xref>.
    // A group without kinematic values (not a robot arm), or a model that the brand cannot read (no catalog entry, a file that cannot be read), throws <xref href="UnderAutomation.Robotics.Controllers.RobotControllerException" data-throw-if-not-resolved="false"></xref>.
    KinematicModel ReadKinematicModel(int group = 1)

    // Reads the current Cartesian position of a motion group, with its configuration, frame and tool, and the joints when the controller gives them
    RobotPosition ReadPose(int group = 1)

    // Reads a tool: pose of the tool center point in the flange frame
    CartesianPose ReadTool(int tool, int group = 1)

    // Reads a user frame, expressed in the world frame of the motion group
    CartesianPose ReadUserFrame(int frame, int group = 1)

    // Stops a motion started by the moves of this service
    void StopMotion()

    // Waits for the end of the motion started by the moves of this service.
    // Throws <xref href="UnderAutomation.Robotics.Controllers.RobotControllerException" data-throw-if-not-resolved="false"></xref> with an inner <xref href="System.TimeoutException" data-throw-if-not-resolved="false"></xref> when the motion is not finished after the timeout.
    void WaitForMotionEnd(int timeoutMs, int group = 1)
}
```

In .NET, a null speed gives the default speed: 10 % for a joint interpolation and 100 mm/s for a linear interpolation.

### RobotPosition

**Members of Controllers.RobotPosition**
```csharp
public sealed class RobotPosition {
    // Creates a position at the origin, with the frame and the tool active on the controller, for group 1
    public RobotPosition()

    // Configuration of the arm. Setting null gives a configuration where every posture is <code>Same</code>.
    public PositionConfiguration Configuration { get; set; }

    // Number of the user frame of the pose. -1 (default): the frame active on the controller.
    public int Frame { get; set; }

    // Number of the motion group, from 1 (default 1)
    public int Group { get; set; }

    // True when <xref href="UnderAutomation.Robotics.Controllers.RobotPosition.Joints" data-throw-if-not-resolved="false"></xref> has values
    public bool HasJoints { get; }

    // Joint values of the same position, when they are known. Empty (no axis) otherwise. Setting null gives an empty joint position.
    public JointValues Joints { get; set; }

    // Object of the brand SDK this position comes from. Null when there is none.
    public object Native { get; set; }

    // Cartesian pose of the tool center point in the frame, in mm and degrees. Setting null gives a pose at the origin.
    public CartesianPose Pose { get; set; }

    public override string ToString()

    // Number of the tool of the pose. -1 (default): the tool active on the controller.
    public int Tool { get; set; }
}
```

### PositionConfiguration

A target uses, in this order: the configuration object of the brand, the solution closest to `NearJoints`, then the postures, where `Same` takes the posture of the current position of the robot.

**Members of Controllers.PositionConfiguration**
```csharp
public sealed class PositionConfiguration {
    // Creates a configuration with the default value of each property
    public PositionConfiguration()

    // Elbow posture
    public ElbowPosture Elbow { get; set; }

    // True when <xref href="UnderAutomation.Robotics.Controllers.PositionConfiguration.NearJoints" data-throw-if-not-resolved="false"></xref> has values
    public bool HasNearJoints { get; }

    // Configuration object of the brand SDK, turns of the axes included. Filled by every read of a position on the brands that have one.
    // A target with a configuration object of the brand of the controller goes back to the same joints. A configuration object of another brand is ignored.
    public object Native { get; set; }

    // Joint position used to choose the solution: the solution closest to it is taken. Empty (no axis) when not set.
    // A read of a position fills it with the joints of the robot at the time of the read. Setting null gives an empty joint position.
    public JointValues NearJoints { get; set; }

    // Shoulder posture
    public ShoulderPosture Shoulder { get; set; }

    // Configuration as the brand writes it when <xref href="UnderAutomation.Robotics.Controllers.PositionConfiguration.Native" data-throw-if-not-resolved="false"></xref> is set, otherwise the three postures. For display and logs only.
    public override string ToString()

    // Wrist posture
    public WristPosture Wrist { get; set; }
}
```

**Members of Controllers.ShoulderPosture**
```csharp
public enum ShoulderPosture {
    // The arm reaches behind axis 1, over its own back
    Back = 2

    // The wrist center is in front of axis 1
    Front = 1

    // In a target: the posture of the current position of the robot. In a read: the controller does not give the posture.
    Same = 0
}
```

**Members of Controllers.ElbowPosture**
```csharp
public enum ElbowPosture {
    // The elbow is below the line from axis 2 to the wrist center
    Down = 2

    // In a target: the posture of the current position of the robot. In a read: the controller does not give the posture.
    Same = 0

    // The elbow is above the line from axis 2 to the wrist center
    Up = 1
}
```

**Members of Controllers.WristPosture**
```csharp
public enum WristPosture {
    // Wrist flipped
    Flip = 2

    // Wrist not flipped
    NoFlip = 1

    // In a target: the posture of the current position of the robot. In a read: the controller does not give the posture.
    Same = 0
}
```

`Same` in a target is the posture of the current position of the robot. In a read, it means that the controller does not give the posture.

### MotionSpeed

**Members of Controllers.MotionSpeed**
```csharp
public sealed class MotionSpeed {
    // Creates a speed with the default value of each property
    public MotionSpeed()

    // Linear interpolation: speed of the tool center point in mm/s, greater than 0 (default 100)
    public double Linear { get; set; }

    // Joint interpolation: percentage of the maximum speed of the axes, greater than 0 and up to 100 (default 10)
    public double Percent { get; set; }

    public override string ToString()
}
```

Setting `Percent` or `Linear` out of range throws `ArgumentOutOfRangeException`.

### KinematicModel

**Members of Controllers.KinematicModel**
```csharp
public sealed class KinematicModel {
    // Creates an empty model of group 1, whose category is unknown
    public KinematicModel()

    // Link length A1 in mm
    public double A1 { get; set; }

    // Link length A2 in mm
    public double A2 { get; set; }

    // Link length A3 in mm
    public double A3 { get; set; }

    // Value of <xref href="UnderAutomation.Robotics.Controllers.KinematicModel.Source" data-throw-if-not-resolved="false"></xref> for values from the catalog of robot models of the brand SDK
    public const string CatalogSource = "catalog"

    // Geometry of the arm, as the brand SDK classifies it
    public KinematicCategory Category { get; set; }

    // Name of the convention of the values, given by the brand adapter (the name of the brand in lower case): the Denavit-Hartenberg table of the kinematics of its SDK
    public string Convention { get; set; }

    // Link offset D4 in mm
    public double D4 { get; set; }

    // Link offset D5 in mm
    public double D5 { get; set; }

    // Link offset D6 in mm
    public double D6 { get; set; }

    // Number of the motion group, from 1
    public int Group { get; set; }

    // True when the angle of the joint 3 is measured from the horizontal, so that the forearm turns with the joints 2 and 3 together
    public bool J2J3Coupling { get; set; }

    // Name of the robot model, as the controller or the catalog gives it. Empty when it is not known.
    public string Model { get; set; }

    // Object of the brand SDK the values come from. Null when there is none.
    public object Native { get; set; }

    // Where the values come from: "catalog" (the catalog of robot models of the brand SDK) or the name of the file read on the controller
    public string Source { get; set; }

    // Offset of the joint 2 in degrees, 0 when the convention of the brand has none
    public double Theta2 { get; set; }

    // Offset of the joint 3 in degrees, 0 when the convention of the brand has none
    public double Theta3 { get; set; }

    // Offset of the joint 5 in degrees, 0 when the convention of the brand has none
    public double Theta5 { get; set; }

    public override string ToString()
}
```

**Members of Controllers.KinematicCategory**
```csharp
public enum KinematicCategory {
    // Wrist offset along the axis 5 with no shoulder and no elbow offset (A1 = 0, A3 = 0, D5 not 0), for example some collaborative arms
    InlineJ5OffsetWrist = 3

    // Ortho-parallel base with a wrist offset along the axis 5: the axes 4 and 6 do not meet
    J5OffsetWrist = 2

    // Ortho-parallel base with a spherical wrist: the axes 4, 5 and 6 meet at one point
    Opw = 1

    // The brand SDK does not classify the arm (another geometry, or no classification given)
    Unknown = 0
}
```

The model has the values of a 6-axis arm: no height of the base and no offset of the joints 1, 4 and 6.

### Errors

The page [Errors](/robotics/documentation/errors) explains each exception and how to avoid it.

- `FeatureNotSupportedException`: the brand has no route for the method.
- `RouteUnavailableException`: the method has routes, but none of them can be used, for example because the route is marked (manual) and not enabled, or because the protocol did not answer at the connection.
- `ControllerRefusedException`: the controller received the command and refused it, for example a move that the controller does not accept in its current state.
- `RobotControllerException`: the route failed. Its inner exception is the exception of the brand SDK. `WaitForMotionEnd` throws it with an inner `TimeoutException` when the motion is not finished after the timeout.
- `ArgumentException`: an invalid argument.

`IsAvailable` only throws `ArgumentOutOfRangeException`, for a value that is not in the enum.

## What to read next

- [Get the current position of a robot](/robotics/documentation/how-to-get-position): the same read on each brand.
- [Move a robot from a PC](/robotics/documentation/how-to-move-robot): the same move on each brand, with what each controller needs before a move.
- [State](/robotics/documentation/state): switch the servo power on before a move.
- [Routing](/robotics/documentation/routing): enable a route that is off at start.
- [Errors](/robotics/documentation/errors): catch the exceptions of the common API.