Skip to content

Commit 265909d

Browse files
committed
edited readme
1 parent 3523225 commit 265909d

File tree

3 files changed

+8
-31
lines changed

3 files changed

+8
-31
lines changed

ur_robot_driver/README_MotionPrimitive.md

Lines changed: 8 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,11 @@ Hardware interface for executing motion primitives on a UR robot using the ROS 2
55

66
![Licence](https://img.shields.io/badge/License-BSD-3-Clause-blue.svg)
77

8-
# Demo Video with URSim
9-
[![Play Video](doc/motion_primitive_ur_driver/motion_primitive_demo_video_preview.png)](https://www.youtube.com/watch?v=htUJtfkgr6Q)
10-
11-
# Related packages/ repos
12-
- [control_msgs](https://github.com/ros-controls/control_msgs/blob/motion_primitives/control_msgs/action/ExecuteMotionPrimitiveSequence.action)
13-
- [ros2_controllers with motion_primitives_forward_controller](https://github.com/b-robotized-forks/ros2_controllers/tree/motion_primitive_forward_controller/motion_primitives_forward_controller)
14-
- [Universal_Robots_ROS2_Driver with motion_primitive_ur_driver](https://github.com/b-robotized-forks/Universal_Robots_ROS2_Driver_MotionPrimitive)
15-
- [Universal_Robots_Client_Library](https://github.com/UniversalRobots/Universal_Robots_Client_Library)
16-
8+
# Demo Video with motion_primitives_forward_controller
9+
[![Play Video](doc/motion_primitive_ur_driver/moprim_forward_controller_ur_demo_thumbnail.png)](https://youtu.be/SKz6LFvJmhQ)
1710

1811
# Architecture
19-
12+
**with motion_primitives_forward_controller**
2013
![Architecture Overview](doc/motion_primitive_ur_driver/ros2_control_motion_primitives_ur.drawio.png)
2114

2215
# Command and State Interfaces
@@ -104,20 +97,20 @@ ros2 run ur_client_library start_ursim.sh -m ur10e
10497
Remote control needs to be enabled:
10598
https://robodk.com/doc/en/Robots-Universal-Robots-How-enable-Remote-Control-URe.html
10699

107-
## Launch hardware_interface with motion_primitives_ur_driver
108-
With URSim:
100+
## With motion_primitives_forward_controller
101+
**With URSim:**
109102
```
110103
ros2 launch ur_robot_driver ur_control.launch.py ur_type:=ur10e robot_ip:=192.168.56.101 launch_rviz:=true headless_mode:=true initial_joint_controller:=motion_primitive_forward_controller
111104
```
112-
With H-KA UR10e:
105+
**With H-KA UR10e:**
113106
```
114107
ros2 launch ur_robot_driver ur_control.launch.py ur_type:=ur10e robot_ip:=192.168.1.102 launch_rviz:=true headless_mode:=true initial_joint_controller:=motion_primitive_forward_controller
115108
```
116-
## (optional) switching control mode
109+
**(optional) switching control mode**
117110
```
118111
ros2 control switch_controllers --activate motion_primitive_forward_controller --deactivate scaled_joint_trajectory_controller
119112
```
120-
## Send motion primitives
113+
**Send motion primitives from python script**
121114
> [!WARNING]
122115
> Ensure that the robot in your configuration is able to execute these motion primitives without any risk of collision.
123116
```
@@ -127,19 +120,3 @@ During the execution of the motion primitives, the movement can be stopped by pr
127120

128121
# TODOs/ Improvements
129122
- if trajectory is finished while `instruction_executer->cancelMotion()` is called --> returns with execution_status ERROR --> no new command can be sent to hw-interface --> need to call `instruction_executer->cancelMotion()` a second time
130-
- The default `hardware_interface` implementation and the `InstructionExecutor` used to execute motion primitives both rely on a callback function that is triggered when a trajectory is completed. In the current implementation, the callback function of the `ur_driver` is overwritten, meaning that only one of the callback functions can be active at a time. This issue has been addressed by registering the `InstructionExecutor`'s callback when motion primitives mode is activated, and restoring the `hardware_interface`'s callback when the mode is deactivated. To enable this, a method `registerTrajDoneCallback()` was added to the `InstructionExecutor` in the `ur_client_library`:
131-
```cpp
132-
void urcl::InstructionExecutor::registerTrajDoneCallback()
133-
{
134-
driver_->registerTrajectoryDoneCallback(
135-
std::bind(&InstructionExecutor::trajDoneCallback, this, std::placeholders::_1));
136-
}
137-
```
138-
--> Is there a better solution for this?
139-
140-
# Useful sources
141-
- https://docs.universal-robots.com/Universal_Robots_ROS_Documentation/doc/ur_client_library/doc/architecture/instruction_executor.html
142-
- https://docs.universal-robots.com/Universal_Robots_ROS_Documentation/doc/ur_client_library/doc/examples/instruction_executor.html
143-
- https://rtw.b-robotized.com/master/use-cases/ros_workspaces/aliases.html
144-
- https://control.ros.org/master/doc/ros2_control/ros2controlcli/doc/userdoc.html
145-
- ...
896 KB
Loading
Binary file not shown.

0 commit comments

Comments
 (0)