Skip to content

Commit cbd6397

Browse files
authored
Add ros-gz-sim patch and trigger rebuild (#76)
1 parent 977920b commit cbd6397

File tree

2 files changed

+52
-4
lines changed

2 files changed

+52
-4
lines changed

patch/ros-jazzy-ros-gz-sim.win.patch

Lines changed: 49 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,54 @@
11
diff --git a/ros_gz_sim/CMakeLists.txt b/ros_gz_sim/CMakeLists.txt
2-
index dc8deb03..ec6ac678 100644
2+
index 9f7f956..86ef3e4 100644
33
--- a/ros_gz_sim/CMakeLists.txt
44
+++ b/ros_gz_sim/CMakeLists.txt
5-
@@ -12,3 +12,4 @@ endif()
6-
+set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
5+
@@ -11,6 +11,9 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
6+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic")
7+
endif()
78

9+
+set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
10+
+
11+
+
12+
find_package(CLI11 REQUIRED)
813
find_package(ament_cmake REQUIRED)
9-
find_package(rclcpp REQUIRED)
14+
find_package(builtin_interfaces REQUIRED)
15+
diff --git a/ros_gz_sim/launch/gz_sim.launch.py.in b/ros_gz_sim/launch/gz_sim.launch.py.in
16+
index 359e9d1..6a06642 100644
17+
--- a/ros_gz_sim/launch/gz_sim.launch.py.in
18+
+++ b/ros_gz_sim/launch/gz_sim.launch.py.in
19+
@@ -16,6 +16,7 @@
20+
21+
import os
22+
from os import environ
23+
+import shutil
24+
25+
from ament_index_python.packages import get_package_share_directory
26+
from catkin_pkg.package import InvalidPackage, PACKAGE_MANIFEST_FILENAME, parse_package
27+
@@ -77,6 +78,12 @@ class GazeboRosPaths:
28+
29+
return gazebo_model_path, gazebo_plugin_path
30+
31+
+def get_executable_path(command):
32+
+ path = shutil.which(command)
33+
+ if path.lower().endswith('.bat'):
34+
+ return os.path.splitext(path)[0]
35+
+ return path
36+
+
37+
def launch_gz(context, *args, **kwargs):
38+
model_paths, plugin_paths = GazeboRosPaths.get_paths()
39+
40+
@@ -111,12 +118,12 @@ def launch_gz(context, *args, **kwargs):
41+
exec_args = gz_args
42+
43+
if len(ign_version) or (ign_version == '' and int(gz_version) < 7):
44+
- exec = 'ruby $(which ign) gazebo'
45+
+ exec = 'ruby ' + get_executable_path('ign') + ' gazebo'
46+
47+
if len(ign_version):
48+
gz_version = ign_version
49+
else:
50+
- exec = 'ruby $(which gz) sim'
51+
+ exec = 'ruby ' + get_executable_path('gz') + ' sim'
52+
53+
if debugger != 'false':
54+
debug_prefix = 'x-terminal-emulator -e gdb -ex run --args'

pkg_additional_info.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@ intra_process_demo:
66
build_number: 8
77
image_view:
88
build_number: 8
9+
ros_gz_sim:
10+
build_number: 8
11+

0 commit comments

Comments
 (0)