-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds ROS 2 Launch file support to examples with visualizations
Launch files were added to the following examples. - `multirobot` - `hydroelastic` - `iiwa_manipulator`
- Loading branch information
1 parent
2d252c3
commit 3fa0c2a
Showing
12 changed files
with
166 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
bazel-* | ||
**/__pycache__/ | ||
|
||
# User-specified configuration | ||
/bazel_ros2_rules/user.bazelrc | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
drake_ros_examples/examples/hydroelastic/launch/hydroelastic_cc_launch.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import os | ||
|
||
from ament_index_python.packages import get_package_prefix | ||
from ament_index_python.packages import get_package_share_directory | ||
from launch import LaunchDescription | ||
from launch.actions import ExecuteProcess | ||
|
||
|
||
def generate_launch_description(): | ||
rviz_config_file = os.path.join(get_package_share_directory('drake_ros_examples'), 'hydroelastic/hydroelastic.rviz') | ||
|
||
# Node for RViz2 | ||
rviz_node = ExecuteProcess( | ||
cmd=['rviz2', '-d', rviz_config_file], | ||
output='screen' | ||
) | ||
|
||
# Node for multirobot in C++ | ||
hydroelastic_cpp_node = ExecuteProcess( | ||
cmd=[os.path.join(get_package_prefix('drake_ros_examples'), 'lib', 'drake_ros_examples', 'hydroelastic')], | ||
) | ||
return LaunchDescription([ | ||
rviz_node, | ||
hydroelastic_cpp_node, | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
drake_ros_examples/examples/iiwa_manipulator/launch/iiwa_manipulator_cc_launch.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import os | ||
|
||
from ament_index_python.packages import get_package_prefix | ||
from ament_index_python.packages import get_package_share_directory | ||
from launch import LaunchDescription | ||
from launch.actions import ExecuteProcess | ||
|
||
|
||
def generate_launch_description(): | ||
rviz_config_file = os.path.join(get_package_share_directory('drake_ros_examples'), 'iiwa_manipulator.rviz') | ||
|
||
# Node for RViz2 | ||
rviz_node = ExecuteProcess( | ||
cmd=['rviz2', '-d', rviz_config_file], | ||
output='screen' | ||
) | ||
|
||
# Node for multirobot in C++ | ||
iiwa_manipulator_cpp_node = ExecuteProcess( | ||
cmd=[os.path.join(get_package_prefix('drake_ros_examples'), 'lib', 'drake_ros_examples', 'iiwa_manipulator')], | ||
) | ||
return LaunchDescription([ | ||
rviz_node, | ||
iiwa_manipulator_cpp_node, | ||
]) |
25 changes: 25 additions & 0 deletions
25
drake_ros_examples/examples/iiwa_manipulator/launch/iiwa_manipulator_py_launch.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import os | ||
|
||
from ament_index_python.packages import get_package_prefix | ||
from ament_index_python.packages import get_package_share_directory | ||
from launch import LaunchDescription | ||
from launch.actions import ExecuteProcess | ||
|
||
|
||
def generate_launch_description(): | ||
rviz_config_file = os.path.join(get_package_share_directory('drake_ros_examples'), 'iiwa_manipulator.rviz') | ||
|
||
# Node for RViz2 | ||
rviz_node = ExecuteProcess( | ||
cmd=['rviz2', '-d', rviz_config_file], | ||
output='screen' | ||
) | ||
|
||
# Node for multirobot in C++ | ||
iiwa_manipulator_py_node = ExecuteProcess( | ||
cmd=[os.path.join(get_package_prefix('drake_ros_examples'), 'lib', 'drake_ros_examples', 'iiwa_manipulator.py')], | ||
) | ||
return LaunchDescription([ | ||
rviz_node, | ||
iiwa_manipulator_py_node, | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
drake_ros_examples/examples/multirobot/launch/multirobot_cc_launch.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import os | ||
|
||
from ament_index_python.packages import get_package_prefix | ||
from ament_index_python.packages import get_package_share_directory | ||
from launch import LaunchDescription | ||
from launch.actions import ExecuteProcess | ||
|
||
|
||
def generate_launch_description(): | ||
rviz_config_file = os.path.join(get_package_share_directory('drake_ros_examples'), 'multirobot.rviz') | ||
|
||
# Node for RViz2 | ||
rviz_node = ExecuteProcess( | ||
cmd=['rviz2', '-d', rviz_config_file], | ||
output='screen' | ||
) | ||
|
||
# Node for multirobot in C++ | ||
multirobot_cpp_node = ExecuteProcess( | ||
cmd=[os.path.join(get_package_prefix('drake_ros_examples'), 'lib', 'drake_ros_examples', 'multirobot')], | ||
) | ||
|
||
return LaunchDescription([ | ||
rviz_node, | ||
multirobot_cpp_node, | ||
]) |
26 changes: 26 additions & 0 deletions
26
drake_ros_examples/examples/multirobot/launch/multirobot_py_launch.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import os | ||
|
||
from ament_index_python.packages import get_package_prefix | ||
from ament_index_python.packages import get_package_share_directory | ||
from launch import LaunchDescription | ||
from launch.actions import ExecuteProcess | ||
|
||
|
||
def generate_launch_description(): | ||
rviz_config_file = os.path.join(get_package_share_directory('drake_ros_examples'), 'multirobot.rviz') | ||
|
||
# Node for RViz2 | ||
rviz_node = ExecuteProcess( | ||
cmd=['rviz2', '-d', rviz_config_file], | ||
output='screen' | ||
) | ||
|
||
# Node for multirobot in Python | ||
multirobot_py_node = ExecuteProcess( | ||
cmd=[os.path.join(get_package_prefix('drake_ros_examples'), 'lib', 'drake_ros_examples', 'multirobot.py')], | ||
) | ||
|
||
return LaunchDescription([ | ||
rviz_node, | ||
multirobot_py_node, | ||
]) |