-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Louise Poubel <[email protected]>
- Loading branch information
1 parent
554cf11
commit da80ba7
Showing
39 changed files
with
189 additions
and
2,829 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
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,2 +1,2 @@ | ||
# This is a shim meta-package | ||
For [ros_gz](https://github.com/gazebosim/ros_gz) | ||
For [ros_gz](https://github.com/gazebosim/ros_gz/tree/ros2/ros_gz) |
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,11 +1,9 @@ | ||
<?xml version="1.0"?> | ||
<?xml-model href="http://download.ros.org/schema/package_format2.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?> | ||
<package format="2"> | ||
<!-- TODO: Make this a metapackage, see | ||
https://github.com/ros2/ros2/issues/408 --> | ||
<name>ros_ign</name> | ||
<version>0.0.1</version> | ||
<description>Shim meta-package to redirect to <a href="https://github.com/gazebosim/ros_gz">ros_gz</a>.</description> | ||
<description>Shim meta-package to redirect to <a href="https://github.com/gazebosim/ros_gz/tree/ros2/ros_gz">ros_gz</a>.</description> | ||
<maintainer email="[email protected]">Brandon Ong</maintainer> | ||
<license>Apache 2.0</license> | ||
|
||
|
@@ -16,8 +14,6 @@ | |
<exec_depend>ros_ign_gazebo</exec_depend> | ||
<exec_depend>ros_ign_gazebo_demos</exec_depend> | ||
<exec_depend>ros_ign_image</exec_depend> | ||
<!-- See https://github.com/gazebosim/ros_gz/issues/40 --> | ||
<!--exec_depend>ros_gz_point_cloud</exec_depend--> | ||
|
||
<test_depend>ament_lint_auto</test_depend> | ||
<test_depend>ament_lint_common</test_depend> | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# This is a shim package | ||
For [ros_gz_sim](https://github.com/gazebosim/ros_gz/tree/ros2/ros_gz_sim) |
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
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,4 @@ | ||
# Copyright 2019 Open Source Robotics Foundation, Inc. | ||
# Copyright 2022 Open Source Robotics Foundation, Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
|
@@ -12,52 +12,23 @@ | |
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
"""Launch Gazebo Sim with command line arguments.""" | ||
|
||
import os | ||
|
||
from ament_index_python.packages import get_package_share_directory | ||
|
||
from launch import LaunchDescription | ||
from launch.actions import DeclareLaunchArgument | ||
from launch.actions import IncludeLaunchDescription | ||
from launch.conditions import IfCondition | ||
from launch.launch_description_sources import PythonLaunchDescriptionSource | ||
from launch.substitutions import LaunchConfiguration | ||
|
||
from launch_ros.actions import Node | ||
|
||
|
||
def generate_launch_description(): | ||
print("ros_ign_gazebo_demos is deprecated! Please use ros_gz_sim_demos instead!") | ||
|
||
pkg_ros_gz_sim = get_package_share_directory('ros_gz_sim') | ||
|
||
# Bridge | ||
bridge = Node( | ||
package='ros_gz_bridge', | ||
executable='parameter_bridge', | ||
arguments=['/air_pressure@sensor_msgs/msg/[email protected]'], | ||
parameters=[{'qos_overrides./air_pressure.publisher.reliability': 'best_effort'}], | ||
output='screen' | ||
) | ||
|
||
gz_sim = IncludeLaunchDescription( | ||
PythonLaunchDescriptionSource( | ||
os.path.join(pkg_ros_gz_sim, 'launch', 'gz_sim.launch.py')), | ||
launch_arguments={'gz_args': '-r sensors.sdf'}.items(), | ||
) | ||
pkg_ros_gz_sim_demos = get_package_share_directory('ros_gz_sim_demos') | ||
|
||
# RQt | ||
rqt = Node( | ||
package='rqt_topic', | ||
executable='rqt_topic', | ||
arguments=['-t'], | ||
condition=IfCondition(LaunchConfiguration('rqt')) | ||
) | ||
return LaunchDescription([ | ||
gz_sim, | ||
DeclareLaunchArgument('rqt', default_value='true', | ||
description='Open RQt.'), | ||
bridge, | ||
rqt | ||
IncludeLaunchDescription( | ||
PythonLaunchDescriptionSource( | ||
os.path.join(pkg_ros_gz_sim_demos, 'launch', 'air_pressure.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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2019 Open Source Robotics Foundation, Inc. | ||
# Copyright 2022 Open Source Robotics Foundation, Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
|
@@ -17,53 +17,18 @@ | |
from ament_index_python.packages import get_package_share_directory | ||
|
||
from launch import LaunchDescription | ||
from launch.actions import DeclareLaunchArgument | ||
from launch.actions import IncludeLaunchDescription | ||
from launch.conditions import IfCondition | ||
from launch.launch_description_sources import PythonLaunchDescriptionSource | ||
from launch.substitutions import LaunchConfiguration | ||
|
||
from launch_ros.actions import Node | ||
|
||
|
||
def generate_launch_description(): | ||
print("ros_ign_gazebo_demos is deprecated! Please use ros_gz_sim_demos instead!") | ||
|
||
pkg_ros_gz_sim = get_package_share_directory('ros_gz_sim') | ||
|
||
# RQt | ||
rqt = Node( | ||
package='rqt_plot', | ||
executable='rqt_plot', | ||
# FIXME: Why isn't the topic being populated on the UI? RQt issue? | ||
arguments=['--force-discover', | ||
'/model/vehicle_blue/battery/linear_battery/state/percentage'], | ||
condition=IfCondition(LaunchConfiguration('rqt')) | ||
) | ||
|
||
gz_sim = IncludeLaunchDescription( | ||
PythonLaunchDescriptionSource( | ||
os.path.join(pkg_ros_gz_sim, 'launch', 'gz_sim.launch.py')), | ||
launch_arguments={ | ||
'gz_args': '-r -z 1000000 linear_battery_demo.sdf' | ||
}.items(), | ||
) | ||
|
||
# Bridge | ||
bridge = Node( | ||
package='ros_gz_bridge', | ||
executable='parameter_bridge', | ||
arguments=[ | ||
'/model/vehicle_blue/cmd_vel@geometry_msgs/msg/[email protected]', | ||
'/model/vehicle_blue/battery/linear_battery/state@sensor_msgs/msg/BatteryState@' | ||
'ignition.msgs.BatteryState' | ||
], | ||
output='screen' | ||
) | ||
pkg_ros_gz_sim_demos = get_package_share_directory('ros_gz_sim_demos') | ||
|
||
return LaunchDescription([ | ||
gz_sim, | ||
DeclareLaunchArgument('rqt', default_value='true', | ||
description='Open RQt.'), | ||
bridge, | ||
rqt | ||
IncludeLaunchDescription( | ||
PythonLaunchDescriptionSource( | ||
os.path.join(pkg_ros_gz_sim_demos, 'launch', 'battery.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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright 2019 Open Source Robotics Foundation, Inc. | ||
# Copyright 2022 Open Source Robotics Foundation, Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
|
@@ -17,47 +17,18 @@ | |
from ament_index_python.packages import get_package_share_directory | ||
|
||
from launch import LaunchDescription | ||
from launch.actions import DeclareLaunchArgument | ||
from launch.actions import IncludeLaunchDescription | ||
from launch.conditions import IfCondition | ||
from launch.launch_description_sources import PythonLaunchDescriptionSource | ||
from launch.substitutions import LaunchConfiguration | ||
|
||
from launch_ros.actions import Node | ||
|
||
|
||
def generate_launch_description(): | ||
print("ros_ign_gazebo_demos is deprecated! Please use ros_gz_sim_demos instead!") | ||
|
||
pkg_ros_gz_sim_demos = get_package_share_directory('ros_gz_sim_demos') | ||
pkg_ros_gz_sim = get_package_share_directory('ros_gz_sim') | ||
|
||
gz_sim = IncludeLaunchDescription( | ||
PythonLaunchDescriptionSource( | ||
os.path.join(pkg_ros_gz_sim, 'launch', 'gz_sim.launch.py')), | ||
launch_arguments={'gz_args': '-r camera_sensor.sdf'}.items(), | ||
) | ||
|
||
# RViz | ||
rviz = Node( | ||
package='rviz2', | ||
executable='rviz2', | ||
arguments=['-d', os.path.join(pkg_ros_gz_sim_demos, 'rviz', 'camera.rviz')], | ||
condition=IfCondition(LaunchConfiguration('rviz')) | ||
) | ||
|
||
# Bridge | ||
bridge = Node( | ||
package='ros_gz_bridge', | ||
executable='parameter_bridge', | ||
arguments=['/camera@sensor_msgs/msg/[email protected]', | ||
'/camera_info@sensor_msgs/msg/[email protected]'], | ||
output='screen' | ||
) | ||
|
||
return LaunchDescription([ | ||
DeclareLaunchArgument('rviz', default_value='true', | ||
description='Open RViz.'), | ||
gz_sim, | ||
bridge, | ||
rviz | ||
IncludeLaunchDescription( | ||
PythonLaunchDescriptionSource( | ||
os.path.join(pkg_ros_gz_sim_demos, 'launch', 'camera.launch.py')), | ||
) | ||
]) |
Oops, something went wrong.