urROS2Node
Conexión al cobot simulado o al cobot físico de Universal Robots por ROS 2
Desde R2024a
Descripción
El objeto urROS2Node representa una conexión desde el equipo host habilitado para ROS 2 a MATLAB. El equipo host habilitado para ROS 2 está también conectado a un robot colaborativo simulado (cobot) de Universal Robots (en el simulador offline URSim de Universal Robots) o a un cobot físico. Para interactuar con el cobot simulado y leer datos de estado de robots, enviar comandos de control cartesiano y de articulaciones, y seguir un conjunto de waypoints de espacio articular o espacio cartesiano, utilice este objeto con las funciones enumeradas en Funciones de objeto.
Creación
Descripción
crea una conexión, ur = urROS2Nodeur, e intenta conectarse al nodo ROS 2, que también está conectado a un cobot simulado o un cobot físico de Universal Robots.
establece las propiedades JointStateTopic, FollowJointTrajectoryAction y RigidBodyTree mediante uno o más argumentos nombre-valor opcionales.ur = urROS2Node(Name=Value)
Argumentos de par nombre-valor
Propiedades
Funciones del objeto
getJointConfiguration | Get current joint configuration from the robot |
getCartesianPose | Get current end-effector pose from the robot |
getEndEffectorVelocity | Get current end-effector velocities from the robot |
getJointVelocity | Get current joint velocities from the robot |
getMotionStatus | Get current motion status of the robot |
followTrajectory | Command robot to move along the desired joint space waypoints |
followWaypoints | Command robot to move along the desired task space waypoints |
sendCartesianPose | Command robot to move to desired Cartesian pose |
sendCartesianPoseAndWait | Command robot to move to desired Cartesian pose and wait for the motion to complete |
sendJointConfiguration | Command robot to move to desired joint configuration |
sendJointConfigurationAndWait | Command robot to move to joint configuration and wait for the motion to complete |
recordRobotState | Log the key robot state parameters during motion of robot |
executePrimaryURScriptCommand | Execute primary URScript command to control cobot over ROS interface |
executeSecondaryURScriptCommand | Execute secondary URScript command over ROS interface |
handBackControl | Get the control back from the External Control program node in the UR program tree |
Ejemplos
Conectarse a un cobot mediante detección automática
Conéctese al cobot físico o simulado (en el simulador offline URSim de Universal Robots o en el simulador Gazebo), en el mismo equipo host, por ROS 2.
ur = urROS2Node;
Conectarse a un cobot especificando el objeto RBT
Conéctese al cobot físico o simulado (en el simulador offline URSim de Universal Robots o en el simulador Gazebo), en el equipo host, mencionando el objeto de árbol de cuerpo rígido.
ur5e = loadrobot('universalUR5e')
ur = urROS2Node(RigidBodyTree=ur5e);ur =
urROS2Node with properties:
RigidBodyTree: [1×1 rigidBodyTree]
JointStateTopic: '/joint_states'
FollowJointTrajectoryAction: '/scaled_pos_joint_traj_controller/follow_joint_trajectory'
NumberOfJoints: 6
EndEffectorName: 'tool0'
Capacidades ampliadas
Historial de versiones
Introducido en R2024a