-
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 2ff591e
Showing
12 changed files
with
156 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
23 changes: 23 additions & 0 deletions
23
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,23 @@ | ||
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') | ||
|
||
rviz_node = ExecuteProcess( | ||
cmd=['rviz2', '-d', rviz_config_file], | ||
output='screen' | ||
) | ||
|
||
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
23 changes: 23 additions & 0 deletions
23
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,23 @@ | ||
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') | ||
|
||
rviz_node = ExecuteProcess( | ||
cmd=['rviz2', '-d', rviz_config_file], | ||
output='screen' | ||
) | ||
|
||
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, | ||
]) |
23 changes: 23 additions & 0 deletions
23
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,23 @@ | ||
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') | ||
|
||
rviz_node = ExecuteProcess( | ||
cmd=['rviz2', '-d', rviz_config_file], | ||
output='screen' | ||
) | ||
|
||
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
24 changes: 24 additions & 0 deletions
24
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,24 @@ | ||
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') | ||
|
||
rviz_node = ExecuteProcess( | ||
cmd=['rviz2', '-d', rviz_config_file], | ||
output='screen' | ||
) | ||
|
||
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, | ||
]) |
24 changes: 24 additions & 0 deletions
24
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,24 @@ | ||
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') | ||
|
||
rviz_node = ExecuteProcess( | ||
cmd=['rviz2', '-d', rviz_config_file], | ||
output='screen' | ||
) | ||
|
||
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, | ||
]) |