> ## Documentation Index
> Fetch the complete documentation index at: https://docs.phospho.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Read Joint Positions

> Read the current positions of the robot's joints in radians and motor units.



## OpenAPI

````yaml post /joints/read
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /joints/read:
    post:
      tags:
        - control
      summary: Read Joint Positions
      description: >-
        Read the current positions of the robot's joints in radians and motor
        units.
      operationId: read_joints_joints_read_post
      parameters:
        - in: query
          name: robot_id
          required: false
          schema:
            default: 0
            title: Robot Id
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - $ref: '#/components/schemas/JointsReadRequest'
                - type: 'null'
              title: Request
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JointsReadResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    JointsReadRequest:
      description: Request to read the joints of the robot.
      properties:
        joints_ids:
          anyOf:
            - items:
                type: integer
              type: array
            - type: 'null'
          description: >-
            If set, only read the joints with these ids. If None, read all
            joints.
          title: Joints Ids
        source:
          default: robot
          description: >-
            Source of the joint angles. 'sim' means the angles are read from the
            simulation, 'robot' means the angles are read from the hardware.
          enum:
            - sim
            - robot
          title: Source
          type: string
        unit:
          default: rad
          description: The unit of the angles. Defaults to radian.
          enum:
            - rad
            - motor_units
            - degrees
          title: Unit
          type: string
      title: JointsReadRequest
      type: object
    JointsReadResponse:
      description: Response to read the joints of the robot.
      properties:
        angles:
          description: >-
            A list of length 6, with the position of each joint in the unit
            specified in the request. If a joint is not available, its value
            will be None.
          items:
            anyOf:
              - type: number
              - type: 'null'
          title: Angles
          type: array
        unit:
          default: rad
          description: The unit of the angles. Defaults to radian.
          enum:
            - rad
            - motor_units
            - degrees
          title: Unit
          type: string
      required:
        - angles
      title: JointsReadResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object

````