Skip to content

Commit 2df4209

Browse files
committed
Fix xacro and change launcher
1 parent de4c24f commit 2df4209

2 files changed

Lines changed: 80 additions & 6 deletions

File tree

Industrial/ur5_gripper_description/urdf/ur5_robotiq85_gripper.urdf.xacro

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<xacro:arg name="use_fake_hardware" default="false"/>
99
<xacro:arg name="fake_sensor_commands" default="false"/>
1010
<xacro:arg name="sim_gazebo" default="false"/>
11-
<xacro:arg name="sim_gz" default="false"/>
11+
<xacro:arg name="sim_gz" default="true"/>
1212
<xacro:arg name="simulation_controllers" default=""/>
1313

1414
<xacro:include filename="$(find ur5_gripper_description)/urdf/ur.urdf.xacro" />
@@ -97,5 +97,12 @@
9797
prefix=""
9898
sim_gz="true"
9999
use_fake_hardware="false"/>
100+
101+
<xacro:ur_ros2_control
102+
name="ur"
103+
prefix=""
104+
sim_gz="true"
105+
use_fake_hardware="false"
106+
/>
100107

101108
</robot>
Lines changed: 72 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,90 @@
1+
#!/usr/bin/env python3
2+
13
"""
2-
Pick Place Harmonic - Main Launcher
4+
Pick Place Harmonic - Main Launcher (FULL)
35
"""
46

57
import os
8+
69
from launch import LaunchDescription
7-
from launch.actions import IncludeLaunchDescription
10+
from launch.actions import IncludeLaunchDescription, TimerAction
811
from launch.launch_description_sources import PythonLaunchDescriptionSource
12+
from launch_ros.actions import Node
13+
from ament_index_python.packages import get_package_share_directory
914

1015

1116
def generate_launch_description():
1217

1318
base_dir = os.path.dirname(__file__)
1419

1520
world_launch = IncludeLaunchDescription(
16-
PythonLaunchDescriptionSource(os.path.join(base_dir, "world.launch.py"))
21+
PythonLaunchDescriptionSource(
22+
os.path.join(base_dir, "world.launch.py")
23+
)
1724
)
1825

1926
robot_launch = IncludeLaunchDescription(
20-
PythonLaunchDescriptionSource(os.path.join(base_dir, "robot.launch.py"))
27+
PythonLaunchDescriptionSource(
28+
os.path.join(base_dir, "robot.launch.py")
29+
)
30+
)
31+
32+
moveit_launch = IncludeLaunchDescription(
33+
PythonLaunchDescriptionSource(
34+
os.path.join(
35+
get_package_share_directory("ur5_gripper_moveit_config"),
36+
"launch",
37+
"move_group.launch.py"
38+
)
39+
)
40+
)
41+
42+
robmove_node = Node(
43+
package="ros2srrc_execution",
44+
executable="robmove",
45+
output="screen",
46+
parameters=[
47+
{"use_sim_time": True},
48+
{"ROB_PARAM": "ur5"}
49+
],
50+
)
51+
52+
robpose_node = Node(
53+
package="ros2srrc_execution",
54+
executable="robpose",
55+
output="screen",
56+
parameters=[
57+
{"use_sim_time": True},
58+
{"ROB_PARAM": "ur5"}
59+
],
60+
)
61+
62+
move_node = Node(
63+
package="ros2srrc_execution",
64+
executable="move",
65+
output="screen",
66+
parameters=[
67+
{"use_sim_time": True},
68+
{"ROB_PARAM": "ur5"},
69+
{"EE_PARAM": "robotiq"},
70+
{"ENV_PARAM": "gazebo"},
71+
],
72+
)
73+
74+
75+
delayed_moveit = TimerAction(
76+
period=5.0,
77+
actions=[moveit_launch]
78+
)
79+
80+
delayed_interfaces = TimerAction(
81+
period=8.0,
82+
actions=[robmove_node, robpose_node, move_node]
2183
)
2284

23-
return LaunchDescription([world_launch, robot_launch])
85+
return LaunchDescription([
86+
world_launch,
87+
robot_launch,
88+
delayed_moveit,
89+
delayed_interfaces
90+
])

0 commit comments

Comments
 (0)