-
Notifications
You must be signed in to change notification settings - Fork 0
/
display.launch.py
33 lines (31 loc) · 977 Bytes
/
display.launch.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from launch import LaunchDescription
from launch_ros.actions import Node
from ament_index_python.packages import get_package_share_directory
import os
def generate_launch_description():
urdf_file_name = 'arduino_robot_arm.urdf'
urdf = os.path.join(
get_package_share_directory('robot_arm_package'),
'urdf',
urdf_file_name)
return LaunchDescription([
Node(
package='robot_state_publisher',
executable='robot_state_publisher',
name='robot_state_publisher',
output='screen',
parameters=[{'robot_description': open(urdf).read()}]
),
Node(
package='joint_state_publisher',
executable='joint_state_publisher',
name='joint_state_publisher',
output='screen'
),
Node(
package='rviz2',
executable='rviz2',
name='rviz2',
output='screen'
)
])