### Basic CMake Project Setup Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/ur/CMakeLists.txt Initializes the CMake build system and defines the project name. This is a standard starting point for CMake projects. ```cmake cmake_minimum_required(VERSION 3.28.3) project(ur) ``` -------------------------------- ### Install Project Targets and Directories Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/ur_controllers/CMakeLists.txt Configures the installation rules for the project's targets, libraries, and include directories. ```cmake install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib RUNTIME DESTINATION bin ) install(DIRECTORY include/ DESTINATION include ) install(FILES controller_plugins.xml DESTINATION share/${PROJECT_NAME} ) ``` -------------------------------- ### Install ur_robot_driver from Binary Packages Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/ur_calibration/doc/installation/installation.md Installs the ur_robot_driver using apt-get. Ensure ROS2 is installed and sourced first. ```bash sudo apt-get install ros-${ROS_DISTRO}-ur ``` -------------------------------- ### Run Example Move Python Node Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/ur_calibration/doc/usage/move.md Execute a basic Python node to move the robot. This node is a starting point for custom ROS nodes but lacks advanced safety checks found in test nodes. ```bash $ ros2 run ur_robot_driver example_move.py ``` ```log [INFO] [1720623611.547903428] [jtc_client]: Waiting for action server on joint_trajectory_controller/follow_joint_trajectory [INFO] [1720623611.548368095] [jtc_client]: Executing trajectory traj0 [INFO] [1720623620.530203889] [jtc_client]: Done with result: SUCCESSFUL [INFO] [1720623622.530668700] [jtc_client]: Executing trajectory traj1 [INFO] [1720623630.582108072] [jtc_client]: Done with result: SUCCESSFUL [INFO] [1720623632.582576444] [jtc_client]: Done with all trajectories [INFO] [1720623632.582957452] [jtc_client]: Done ``` -------------------------------- ### Example URSim Launch Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/ur_calibration/doc/usage/simulation.md An example of launching the URSim simulator with specific URSim version and robot model. ```console $ ros2 run ur_client_library start_ursim.sh -v 10.8.0 -m ur20 ROBOT_MODEL: ur20 ROBOT_SERIES: polyscopex URSIM_VERSION: 10.8.0 5b140a83f8600c7ada0b7d75bc7a5808667adbeec77387e8c73b093f10fd2379 Starting URSim. Waiting for UrService to be up................................... UrService is up Installing URCapX /home/feex/.ursim/polyscopex/urcaps/external-control-0.1.0.urcapx To access PolyScopeX, open the following URL in a web browser. http://192.168.56.101 To exit, press CTRL+C ``` -------------------------------- ### load_installation Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/ur_calibration/doc/dashboard_client.md Load a robot installation from a file. ```APIDOC ## load_installation ### Description Load a robot installation from a file. ### Method Call ### Endpoint /load_installation ### Parameters #### Request Body - **filename** (string) - Required - The name of the installation file to load. ### Response #### Success Response (200) - **success** (boolean) - True if the installation was loaded successfully. - **message** (string) - The response message from the server. ``` -------------------------------- ### Install Launch Directory Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/ur_calibration/CMakeLists.txt Installs the 'launch' directory to the share directory of the package, making launch files accessible. ```cmake install(DIRECTORY launch DESTINATION share/${PROJECT_NAME} ) ``` -------------------------------- ### Launch MoveIt with UR Driver Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/ur_calibration/doc/usage/move.md Start the UR driver and then launch the MoveIt! nodes for planning and executing trajectories. This requires the ur_moveit_config package. ```bash ros2 launch ur_moveit_config ur_moveit.launch.py ur_type:=ur5e launch_rviz:=true ``` -------------------------------- ### Clone, Install Dependencies, Build, and Source Workspace Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/ur_calibration/doc/installation/installation.md Clones the driver repository, imports other necessary packages using vcs, installs system dependencies with rosdep, and builds the workspace with colcon. Replace with your ROS2 distribution (e.g., humble, iron, main). ```bash cd $COLCON_WS git clone -b https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver.git src/Universal_Robots_ROS2_Driver vcs import src --skip-existing --input src/Universal_Robots_ROS2_Driver/Universal_Robots_ROS2_Driver-not-released.${ROS_DISTRO}.repos rosdep update rosdep install --ignore-src --from-paths src -y colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release source install/setup.bash ``` -------------------------------- ### Install Executables Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/ur_robot_driver/CMakeLists.txt Installs the defined executables to the lib/ directory. ```cmake install( TARGETS dashboard_client controller_stopper_node urscript_interface robot_state_helper trajectory_until_node DESTINATION lib/${PROJECT_NAME} ) ``` -------------------------------- ### Install Pre-commit Hooks Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/README.md Install pre-commit to automatically format code with clang-format upon git commit. Ensure clang-format 14 is installed. ```bash pip3 install pre-commit ``` ```bash sudo apt install clang-format-14 ``` ```bash pre-commit install ``` -------------------------------- ### Install Include Directory Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/ur_calibration/CMakeLists.txt Installs the 'include' directory to the top-level include path for the package. ```cmake install(DIRECTORY include/ DESTINATION include ) ``` -------------------------------- ### play Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/ur_calibration/doc/dashboard_client.md Start execution of a previously loaded program. ```APIDOC ## play ### Description Start execution of a previously loaded program. ### Method Call ### Endpoint /play ### Response #### Success Response (200) - **success** (boolean) - True if the program started execution successfully. - **message** (string) - The response message from the server. ``` -------------------------------- ### Launch Command with Absolute Path Example Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/ur_robot_driver/doc/migration_notes.md Demonstrates how to use an absolute path for configuration files in launch commands. This is necessary after enforcing absolute paths for files altering the launch process. ```bash ros2 launch ur_robot_driver ur_control.launch.py ur_type:=ur20 robot_ip:=192.168.56.101 \n kinematics_params_file:=$(ros2 pkg prefix my_robot_cell_control)/share/my_robot_cell_control/config/my_robot_calibration.yaml ``` -------------------------------- ### Install Build Tools and VCS Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/ur_calibration/doc/installation/installation.md Installs colcon extensions and vcs tool required for building from source. Ensure ROS2 is sourced. ```bash sudo apt install python3-colcon-common-extensions python3-vcstool ``` -------------------------------- ### Launch UR Control Launch File Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/ur_calibration/doc/usage/startup.md Use this command to start the UR robot driver with essential parameters. Ensure 'ur_type' and 'robot_ip' are correctly set for your robot. ```bash ros2 launch ur_robot_driver ur_control.launch.py ur_type:=ur5e robot_ip:=192.168.56.101 ``` -------------------------------- ### Start Force Mode Service Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/ur_controllers/doc/usage/force_torque_control.md This service starts the force mode controller. It requires a `SetForceMode` message. ```ros2 ros2 service call ~/start_force_mode ur_msgs/srv/SetForceMode ``` -------------------------------- ### Start URSim with UR10e Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/ur_robot_driver/README_MotionPrimitive.md Launches the URSim simulation environment for a UR10e robot. Ensure remote control is enabled for the robot. ```bash ros2 run ur_client_library start_ursim.sh -m ur10e ``` -------------------------------- ### Install UR ROS2 Driver Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/README.md Installs the Universal Robots ROS2 driver using apt-get. Ensure you are using a compatible ROS distribution. ```bash sudo apt-get install ros-rolling-ur ``` -------------------------------- ### Install Calibration Correction Executable Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/ur_calibration/CMakeLists.txt Installs the 'calibration_correction' executable to the runtime library directory. ```cmake install(TARGETS calibration_correction RUNTIME DESTINATION lib/${PROJECT_NAME} ) ``` -------------------------------- ### Launch UR Driver with Hardware Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/ur_calibration/doc/usage/toc.md Use this command to launch the UR ROS2 driver with physical hardware. Remember to start the external_control URCap program from the pendant after launching. ```console $ ros2 launch ur_robot_driver ur_control.launch.py ur_type:= robot_ip:= launch_rviz:=true ``` -------------------------------- ### Launch URSim Simulator Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/ur_calibration/doc/usage/simulation.md Use this script to start the URSim simulator. Specify the robot type and URSim version. If versions are omitted, defaults are used. ```bash ros2 run ur_client_library start_ursim.sh -m -v ``` -------------------------------- ### Run Force Mode Example Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/ur_calibration/doc/usage/force_torque_control.md This script demonstrates how to activate and deactivate force mode on the robot. It requires the `passthrough_trajectory_controller` and `force_mode_controller` to be loaded. ```python import rclpy from ur_msgs.action import SetIO from ur_msgs.srv import SetPayload from ur_robot_driver.examples.force_mode import force_mode_example def main(): rclpy.init() force_mode_example() rclpy.shutdown() if __name__ == '__main__': main() ``` -------------------------------- ### Basic CMakeLists.txt Configuration Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/ur_moveit_config/CMakeLists.txt Standard CMakeLists.txt for a ROS 2 package. Includes minimum version, project name, finding ament_cmake, and package installation directives. ```cmake cmake_minimum_required(VERSION 3.28.3) project(ur_moveit_config) find_package(ament_cmake REQUIRED) ament_package() install( DIRECTORY config launch srdf DESTINATION share/${PROJECT_NAME} ) ``` -------------------------------- ### Run rs485 Node with Specified Device Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/ur_calibration/doc/setup_tool_communication.md Run an rs485 node, specifying the device path for communication. This example assumes the 'imaginary_drivers' package and 'rs485_node'. ```bash $ ros2 run imaginary_drivers rs485_node --ros-args -p device:=/tmp/ttyUR ``` -------------------------------- ### Conditional Testing Dependencies Setup Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/ur/CMakeLists.txt Configures dependencies for testing if the BUILD_TESTING flag is enabled. It finds linting packages and sets up test dependencies. ```cmake if(BUILD_TESTING) find_package(ament_lint_auto REQUIRED) set(ament_cmake_copyright_FOUND TRUE) set(ament_cmake_cpplint_FOUND TRUE) ament_lint_auto_find_test_dependencies() endif() ``` -------------------------------- ### Launch Joint Trajectory Controller Demo Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/ur_calibration/doc/usage/move.md Use this command to launch a demo node that sends goals to the Joint Trajectory Controller. Ensure the ros2_controllers_test_nodes package is installed. ```bash $ ros2 launch ur_robot_driver test_joint_trajectory_controller.launch.py ``` -------------------------------- ### Generate Absolute Path for Calibration File Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/ur_calibration/doc/migration_notes.md Use `ros2 pkg prefix` to dynamically generate an absolute path for configuration files within launch files. This ensures that files are correctly located regardless of the package installation path. ```bash $ ros2 launch ur_robot_driver ur_control.launch.py ur_type:=ur20 robot_ip:=192.168.56.101 \ kinematics_params_file:=$(ros2 pkg prefix my_robot_cell_control)/share/my_robot_cell_control/config/my_robot_calibration.yaml ``` -------------------------------- ### Symbol Lookup Error Example Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/ur_calibration/doc/usage/toc.md This error indicates an ABI break, often due to outdated ROS installations or system updates after compiling from source. Reinstalling ROS and recompiling your workspace is recommended. ```text [ros2_control_node-1] /opt/ros/rolling/lib/controller_manager/ros2_control_node: symbol lookup error: /opt/ros/rolling/lib/libpal_statistics_msgs__rosidl_typesupport_fastrtps_cpp.so: undefined symbol: _ZN8eprosima7fastcdr3Cdr9serializeEj [ERROR] [ros2_control_node-1]: process has died [pid 251, exit code 127, cmd '/opt/ros/rolling/lib/controller_manager/ros2_control_node --ros-args --params-file /opt/ros/rolling/share/ur_robot_driver/config/ur5e_update_rate.yaml --params-file /tmp/launch_params_cdtxg1uh']. ``` -------------------------------- ### Trajectory Passthrough GPIO Configuration Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/ur_controllers/doc/index.md This XML configuration defines the GPIO setup for trajectory passthrough operations. It specifies command interfaces for positions, velocities, accelerations, transfer state, time from start, and abort signals for each joint. Ensure hardware does not activate these in parallel with streaming interfaces. ```xml ``` -------------------------------- ### Launch UR Driver with Mock Hardware Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/ur_calibration/doc/usage/toc.md This command launches the UR ROS2 driver with mock hardware, utilizing the capability of ros2_control. This is useful for testing without physical hardware. ```console $ ros2 launch ur_robot_driver ur_control.launch.py ur_type:=ur5e robot_ip:=yyy.yyy.yyy.yyy use_mock_hardware:=true ``` -------------------------------- ### Show All Launch Arguments Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/ur_controllers/doc/usage/startup.md Displays all available arguments for the ur_control.launch.py launch file, allowing for detailed configuration. This command is useful for understanding all customization options. ```bash $ ros2 launch ur_robot_driver ur_control.launch.py --show-args ``` -------------------------------- ### Launch UR Control with Mock Hardware Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/ur_calibration/doc/usage/move.md Launch the UR control with mock hardware enabled, specifying the robot type and initial joint controller. This is useful for testing without a physical robot. ```bash $ ros2 launch ur_robot_driver ur_control.launch.py ur_type:=ur5e \ robot_ip:=yyy.yyy.yyy.yyy use_mock_hardware:=true \ initial_joint_controller:=joint_trajectory_controller ``` -------------------------------- ### Start Force Mode Service Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/ur_calibration/doc/usage/force_torque_control.md Starts the force mode controller, allowing for Cartesian-space force and torque control. This service interfaces with the URScript function `force_mode(...)`. ```APIDOC ## Start Force Mode ### Description Starts the force mode controller for Cartesian-space force and torque control. ### Method Call Service ### Endpoint `~/start_force_mode` ### Parameters #### Service Message (`ur_msgs/srv/SetForceMode`) - **force_mode_srv** (ur_msgs/srv/SetForceMode) - Required - The service message to start force mode. - **axes** (array of int8) - Required - Selection vector determining which axes are force-controlled. - **forces** (array of float64) - Required - Desired forces/torques relative to the task frame. - **velocities** (array of float64) - Required - Maximum velocities for compliant axes. - **task_frame** (array of float64) - Required - Pose of the task frame relative to the robot's base frame. ### Response #### Success Response - **success** (bool) - True if the service call was successful. - **message** (string) - A message indicating the result of the service call. ``` -------------------------------- ### Show UR Control Launch Arguments Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/ur_calibration/doc/usage/startup.md This command displays all available arguments for the `ur_control.launch.py` launch file, allowing for further customization. ```bash ros2 launch ur_robot_driver ur_control.launch.py --show-args ``` -------------------------------- ### get_loaded_program Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/ur_calibration/doc/dashboard_client.md Get the name of the currently loaded program. ```APIDOC ## get_loaded_program ### Description Get the name of the currently loaded program. ### Method Call ### Endpoint /get_loaded_program ### Response #### Success Response (200) - **program_name** (string) - The name of the currently loaded program. - **success** (boolean) - True if the program name was retrieved successfully. - **message** (string) - The response message from the server. ``` -------------------------------- ### brake_release Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/ur_calibration/doc/dashboard_client.md Service to release the brakes. If the robot is currently powered off, it will get powered on the fly. ```APIDOC ## brake_release ### Description Service to release the brakes. If the robot is currently powered off, it will get powered on the fly. ### Method Call ### Endpoint /brake_release ### Response #### Success Response (200) - **success** (boolean) - True if the brakes were released successfully. - **message** (string) - The response message from the server. ``` -------------------------------- ### power_on Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/ur_calibration/doc/dashboard_client.md Power on the robot motors. To fully start the robot, call ‘brake_release’ afterwards. ```APIDOC ## power_on ### Description Power on the robot motors. To fully start the robot, call ‘brake_release’ afterwards. ### Method Call ### Endpoint /power_on ### Response #### Success Response (200) - **success** (boolean) - True if the motors were powered on successfully. - **message** (string) - The response message from the server. ``` -------------------------------- ### get_programs Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/ur_calibration/doc/dashboard_client.md PolyScope X only: Get a list of all programs on the robot. This service is only available on a PolyScope X robot with version >= 10.12.0. ```APIDOC ## get_programs ### Description **PolyScope X only**: Get a list of all programs on the robot. This service is only available on a PolyScope X robot with version >= 10.12.0. ### Method Call ### Endpoint /get_programs ### Response #### Success Response (200) - **programs** (list of strings) - A list of all program names on the robot. - **success** (boolean) - True if the list of programs was retrieved successfully. - **message** (string) - The response message from the server. ``` -------------------------------- ### Launch UR Driver with Tool Communication Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/ur_calibration/doc/setup_tool_communication.md Launch the UR robot driver with tool communication enabled. Ensure your user has write permissions to /tmp/ttyUR. ```bash $ ros2 launch ur_robot_driver ur_control.launch.py ur_type:=ur5e robot_ip:=yyy.yyy.yyy.yyy use_tool_communication:=true use_mock_hardware:=false launch_rviz:=false # remember that your user needs to have the rights to write that file handle to /tmp/ttyUR ``` -------------------------------- ### Force Mode Controller Services Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/ur_controllers/doc/index.md The ForceModeController provides services to start and stop force mode. The controller must be in an active state to use these services. ```APIDOC ## Services ### `~/stop_force_mode` * **Description**: Stops the force mode. * **Service Type**: `std_srvs/srv/Trigger` ### `~/start_force_mode` * **Description**: Starts the force mode with specified parameters. * **Service Type**: `ur_msgs/srv/SetForceMode` #### `ur_msgs/srv/SetForceMode` Fields: * **`task_frame`** (PoseStamped): Pose defining the reference frame for force mode parameters. The `frame_id` must be transformable to the robot's `base` frame. * **`selection_vector_`** (array of int): A vector of 6 integers (0 or 1). A '1' indicates compliance along the corresponding axis of the task frame. A '0' indicates stiffness. * **`wrench`** (WrenchStamped): The desired forces and torques to be applied to the environment in the task frame. Values are ignored for non-compliant axes. Actual wrench may be lower due to joint limits. * **`type`** (int): Specifies how the force frame is interpreted. Values can be [1, 2, 3]. * 1: Aligns the force frame's y-axis with the vector from the robot TCP to the force frame origin. * 2: The force frame is not transformed. * 3: Aligns the force frame's x-axis with the projection of the robot TCP velocity vector onto the force frame's x-y plane. * **`speed_limits`** (Twist): Maximum allowed TCP speed relative to the task frame. Only relevant for compliant axes. * **`deviation_limits`** (Twist): Maximum allowed deviation along/about non-compliant axes between the actual TCP position and the program-set position. * **`damping_factor`** (float): Force mode damping factor, in the range [0, 1]. Default is 0.025. Higher values increase damping. * **`gain_scaling`** (float): Force mode gain scaling factor, in the range [0, 2]. Default is 0.5. Values > 1 can lead to instability. ``` -------------------------------- ### Resume Program in Headless Mode Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/ur_calibration/doc/usage/startup.md If the driver was started with `headless_mode:=true`, use this service call to resend the robot program and resume execution after an interruption. ```bash $ ros2 service call /io_and_status_controller/resend_robot_program std_srvs/srv/Trigger {} ``` -------------------------------- ### Launch UR Driver with Calibration Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/ur_calibration/doc/usage.md Launches the UR driver with the previously generated calibration correction file. Ensure the `ur_type` matches your robot model and the `kinematics_params_file` points to the correct YAML file. ```bash $ ros2 launch ur_robot_driver ur_control.launch.py \ ur_type:=ur5e \ robot_ip:=192.168.56.101 \ kinematics_params_file:="${HOME}/my_robot_calibration.yaml" ``` -------------------------------- ### Launch ROS 2 Driver with URSim Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/ur_calibration/doc/usage/simulation.md Launch the UR ROS 2 driver, connecting it to the URSim instance. RViz visualization is enabled by default. ```bash ros2 launch ur_robot_driver ur_control.launch.py ur_type:= robot_ip:=192.168.56.101 launch_rviz:=true ``` -------------------------------- ### Configure C++ Unit Tests with GMock Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/ur_calibration/CMakeLists.txt Sets up Google Mock for C++ unit tests if testing is enabled, linking the test executable against the 'calibration' library. ```cmake if(BUILD_TESTING) find_package(ament_cmake_gmock REQUIRED) # Get the first item (it will be the build space version of the build path). list(GET ament_index_build_path 0 ament_index_build_path) if(WIN32) # On Windows prevent CMake errors and prevent it being evaluated as a list. string(REPLACE "\\" "/" ament_index_build_path "${ament_index_build_path}") endif() ament_add_gmock( calibration_test test/calibration_test.cpp ) target_link_libraries(calibration_test calibration ) endif() ``` -------------------------------- ### Configure Testing with GMock Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/ur_controllers/CMakeLists.txt Sets up testing infrastructure using ament_cmake_gmock, finding necessary packages and defining test targets. ```cmake if(BUILD_TESTING) find_package(ament_cmake_gmock REQUIRED) find_package(controller_manager REQUIRED) find_package(hardware_interface REQUIRED) find_package(ros2_control_test_assets REQUIRED) add_definitions(-DTEST_FILES_DIRECTORY="${CMAKE_CURRENT_SOURCE_DIR}/test") ament_add_gmock(test_load_force_mode_controller test/test_load_force_mode_controller.cpp ) target_link_libraries(test_load_force_mode_controller ${PROJECT_NAME} controller_manager::controller_manager ros2_control_test_assets::ros2_control_test_assets ) ament_add_gmock(test_load_freedrive_mode_controller test/test_load_freedrive_mode_controller.cpp ) target_link_libraries(test_load_freedrive_mode_controller ${PROJECT_NAME} controller_manager::controller_manager ros2_control_test_assets::ros2_control_test_assets ) ament_add_gmock(test_load_friction_model_controller test/test_load_friction_model_controller.cpp ) target_link_libraries(test_load_friction_model_controller ${PROJECT_NAME} controller_manager::controller_manager ros2_control_test_assets::ros2_control_test_assets ) endif() ``` -------------------------------- ### Create ROS2 Workspace Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/ur_calibration/doc/installation/installation.md Sets up the COLCON_WS environment variable and creates the source directory for a new ROS2 workspace. ```bash export COLCON_WS=~/workspace/ros_ur_driver mkdir -p $COLCON_WS/src ``` -------------------------------- ### Launch UR Control Launch File Source: https://github.com/universalrobots/universal_robots_ros2_driver/blob/main/ur_controllers/doc/usage/startup.md Launches the ur_control.launch.py script for the UR robot driver. Requires specifying the robot type and IP address. Ensure the robot is prepared with the External Control URCap and a program. ```bash $ ros2 launch ur_robot_driver ur_control.launch.py ur_type:=ur5e robot_ip:=192.168.56.101 ```