Get current motion status of the robot
Obtain Current Motion Status from Cobot
Connect to a physical or simulated cobot at IP address
192.168.2.112 on the ROS network.
ur = universalrobot('192.168.2.112');
Get the current motion status of the cobot and the goal state.
[result,state] = getMotionStatus(ur);
ur — Connection to Universal Robots cobot
Connection to physical or simulated cobot from Universal Robots, specified as a
result — Motion status of Universal Robots cobot
logical scalar |
Motion status of simulated cobot from Universal Robots, specified as a logical
state — Final goal state
Final goal state of the simulated cobot, returned as one of the following:
'pending'— Goal was received, but has not yet been accepted or rejected.
'active'— Goal was accepted and is running on the server.
'succeeded'— Goal executed successfully.
'preempted'— An action client canceled the goal before it finished executing.
'rejected'— The goal was not accepted after being in the 'pending' state. The action server typically triggers this status.
'aborted'— The goal was aborted before it finished executing. The action server typically aborts a goal.
'recalled'— A client canceled the goal while it was in the 'pending' state.
'lost'— An internal error occurred in the action client.
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Introduced in R2022a