.. _get_user_home: get_user_home ------------------------------------------ This function retrieves the **user-defined home position** stored in the robot controller. The returned structure contains the joint angles [deg] of the home position previously set using :ref:`set_user_home `. This function is often used to **verify or log** the stored home pose before executing a homing motion or during system initialization. **Definition** |br| ``DRFLEx.h`` within class `CDRFLEx`, public section .. code-block:: cpp LPROBOT_POSE get_user_home() { return _get_user_home(_rbtCtrl); }; **Parameter** |br| None **Return** .. list-table:: :widths: 25 75 :header-rows: 1 * - **Value** - **Description** * - :ref:`LPROBOT_POSE ` - Returns a pointer to the user-defined home position data structure. .. note:: This call waits for the controller to answer. The returned pointer refers to storage in the CDRFLEx object that other DRFL calls and every reconnect reuse; copy the structure before making another DRFL call. The 3-argument ``ikin`` returns its result in storage shared by all CDRFLEx objects in the process instead; see :ref:`ikin `. Except for ``get_user_home``, the pointer is never NULL; do not use a NULL check to detect failure. Returns NULL if the request cannot be sent; check for NULL before dereferencing. **Example** .. code-block:: cpp // (1) Retrieve the stored user home joint position LPROBOT_POSE pHome = drfl.get_user_home(); // (2) Print the joint angles of the user home if (pHome != NULL) { for (int i = 0; i < NUMBER_OF_JOINT; ++i) printf("User Home J%d [deg]: %.2f\n", i + 1, pHome->_fPosition[i]); } This example retrieves the robot’s user-defined home position and prints its joint angles for verification or debugging.