Borrar filtros
Borrar filtros

Not able to use 'urROSNode' or 'universalrobot' API due to ROS action server unavailable.

48 visualizaciones (últimos 30 días)
Facing following error message while setting up ROS VM and using ‘universalrobot’ API from 'Robotics System Toolbox Support Package for Universal Robots UR Series Manipulators'.
Error:
Error using codertarget.manipROSInterface.manipulatorROSInterface/initializeROSActionClient (line 359)
The ROS action server "/pos_joint_traj_controller/follow_joint_trajectory" is currently unavailable.

Respuesta aceptada

Jishnu Subramonian
Jishnu Subramonian el 16 de Mayo de 2024
Editada: Jishnu Subramonian el 4 de Jul. de 2024 a las 8:27
The following steps enable using the 'universalrobot' or 'urROSNode' API.
1. Steps to follow in ROS environment:
To initiate the ROS Driver on the ROS Machine, follow these steps on your Ubuntu PC:
Note: `ROS_HOST_IP` refers to the IP address of the machine on which ROS is operating, while the `Robot IP` denotes the IP address of the robot.
  1. Perform the following in the Ubuntu terminal,
  • ~/ur_ws$ source devel/setup.bash
  • ~/ur_ws$ export ROS_IP=192.168.X.X
For URSim use the following launch command,
  • ~/ur_ws$ roslaunch ur_robot_driver ur5e_bringup.launch robot_ip:=127.0.0.1
For Gazebo use,
  • ~/ur_ws$ roslaunch ur_gazebo ur5e_bringup.launch
2. Verify if action server is up on terminal using rostopic list,
  • rostopic list must show the following action servers with actions cancel, feedback, etc,
  • -- For URSim : pos_joint_traj_controller and scaled_ pos_joint_traj_controller
  • -- For Gazebo : pos_joint_traj_controller
  • If these are not visible, please re-launch the ur-driver using above command.
  • This confirms the action server is up and running.
2. Steps to follow in MATLAB:
Perform the following steps to verify if MATLAB detects action server.
  1. Recommended workflow is to follow the hardware setup screens to register the dashboard_msgs in MATLAB, alternatively this can done using the following command,
>> status = codertarget.manipROSInterface.addCustomROSmsg('ur')
2. Creating the ‘ur’ object, replace X.X with actual IP
>> ur = urROSNode(192.168.X.X)
3. Steps to Troubleshoot Issues with Creating universalrobot API
If the issue still persist, the network settings need to be updated,
To address this, it is recommended to update the setting of Windows network to 'Private' and configuring the virtual machine (VM) to use a 'Bridged Network' following the steps below,
  1. Windows: Change the Network & Internet settings to Private network as seen the image below, for detailed steps refer to Make a Wi-Fi network public or private in Windows - Microsoft Support
2. VM: Switch the Network settings to Bridged and wait for about 2 minutes to see the IP address update.
Now follow steps 1 and 2 from above to use the 'universalrobot' or 'urROSNode' API.

Más respuestas (0)

Categorías

Más información sobre Network Connection and Exploration en Help Center y File Exchange.

Productos


Versión

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by