Skip to content

Commit 8662f43

Browse files
Merge pull request #279 from mateusz-lichota/master
Port the ros bridge to galactic
2 parents b0dafb6 + e4e2d68 commit 8662f43

20 files changed

Lines changed: 3118 additions & 96 deletions

.gitmodules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
[submodule "ros/src/fs_msgs"]
22
path = ros/src/fs_msgs
33
url = https://github.com/FS-Driverless/fs_msgs.git
4+
[submodule "ros2/src/fs_msgs"]
5+
path = ros2/src/fs_msgs
6+
url = https://github.com/FS-Driverless/fs_msgs.git
7+
branch = ros2

ros2/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
build/
2+
install/
3+
log/

ros2/src/fs_msgs

Submodule fs_msgs added at 8f9bfac
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
cmake_minimum_required(VERSION 3.10.0)
2+
project(fsds_ros2_bridge)
3+
4+
# set this to path to AirSim root folder if you want your catkin workspace in a custom directory
5+
set(AIRSIM_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../../../AirSim/)
6+
7+
add_subdirectory("${AIRSIM_ROOT}/cmake/rpclib_wrapper" rpclib_wrapper)
8+
add_subdirectory("${AIRSIM_ROOT}/cmake/AirLib" AirLib)
9+
10+
set(CMAKE_CXX_STANDARD 11)
11+
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pthread")
12+
set(CXX_EXP_LIB "-nostdinc++ -I/usr/include/c++/8 -I/usr/include/x86_64-linux-gnu/c++/8 -nodefaultlibs
13+
-l/usr/lib/x86_64-linux-gnu/libc++.so -l/usr/lib/x86_64-linux-gnu/libc++abi.so
14+
-lm -lc -lgcc_s -lgcc
15+
-lstdc++fs -fmax-errors=10 -Wnoexcept -Wstrict-null-sentinel")
16+
17+
set(RPC_LIB_INCLUDES " ${AIRSIM_ROOT}/external/rpclib/rpclib-2.2.1/include")
18+
set(RPC_LIB rpc) # name of .a file with lib prefix
19+
message(STATUS "found RPC_LIB_INCLUDES=${RPC_LIB_INCLUDES}")
20+
21+
# find dependencies
22+
find_package(ament_cmake_auto REQUIRED)
23+
ament_auto_find_build_dependencies()
24+
25+
find_package( OpenCV REQUIRED )
26+
include_directories( ${OpenCV_INCLUDE_DIRS} )
27+
28+
include_directories(
29+
include
30+
${AIRSIM_ROOT}/AirLib/deps/eigen3
31+
${AIRSIM_ROOT}/AirLib/include
32+
${RPC_LIB_INCLUDES}
33+
)
34+
35+
find_package( PkgConfig REQUIRED)
36+
pkg_check_modules( libcurl REQUIRED libcurl )
37+
38+
ament_auto_add_library(airsim_ros src/airsim_ros_wrapper.cpp)
39+
target_link_libraries(airsim_ros yaml-cpp AirLib)
40+
41+
ament_auto_add_executable(fsds_ros2_bridge src/fsds_ros2_bridge.cpp)
42+
target_link_libraries(fsds_ros2_bridge airsim_ros AirLib ${libcurl_LIBRARIES})
43+
44+
ament_auto_add_executable(fsds_ros2_bridge_camera src/fsds_ros2_bridge_camera.cpp)
45+
target_link_libraries(fsds_ros2_bridge_camera AirLib ${OpenCV_LIBS})
46+
47+
# install(TARGETS
48+
# #list of shared libraries
49+
# airsim_ros
50+
# # pd_position_controller_simple
51+
# ARCHIVE DESTINATION lib/${PROJECT_NAME}/
52+
# LIBRARY DESTINATION lib/${PROJECT_NAME}/
53+
# )
54+
55+
# install(FILES
56+
# #list of necessary files (xml...)
57+
# README.md
58+
# # settings.json
59+
# # nodelet_plugins.xml
60+
# DESTINATION share/${PROJECT_NAME}/
61+
# )
62+
63+
ament_auto_package(INSTALL_TO_SHARE launch)
64+
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Formula Student Driverless Simulator ROS Bridge
2+
3+
Warning: this readme was written for ROS1, and was not yet updated for ROS2. Major parts of it should stay the same, but some details might be outdated.
4+
5+
Connects your ROS autonomous system to the FSDS!
6+
7+
A ROS wrapper over the AirSim C++ **Car** client library. This code is based on the [original AirSim ROS wrapper for the *Multirotor* API](https://github.com/microsoft/AirSim/tree/master/ros/src/airsim_ros_interface) and provides an interface between AirSim + Unreal Engine and your ros-based autonomous system.
8+
9+
For more documentation, please consult this [page](../../../docs/ros-bridge.md).

ros2/src/fsds_ros2_bridge/config/multiplot/multiplot.xml

Lines changed: 937 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 242 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,242 @@
1+
Panels:
2+
- Class: rviz/Displays
3+
Help Height: 138
4+
Name: Displays
5+
Property Tree Widget:
6+
Expanded:
7+
- /Global Options1
8+
- /TF1/Frames1
9+
Splitter Ratio: 0.5051546096801758
10+
Tree Height: 1106
11+
- Class: rviz/Selection
12+
Name: Selection
13+
- Class: rviz/Tool Properties
14+
Expanded:
15+
- /2D Pose Estimate1
16+
- /2D Nav Goal1
17+
- /Publish Point1
18+
Name: Tool Properties
19+
Splitter Ratio: 0.5886790156364441
20+
- Class: rviz/Views
21+
Expanded:
22+
- /Current View1
23+
Name: Views
24+
Splitter Ratio: 0.5
25+
- Class: rviz/Time
26+
Experimental: false
27+
Name: Time
28+
SyncMode: 0
29+
SyncSource: Image
30+
Preferences:
31+
PromptSaveOnExit: true
32+
Toolbars:
33+
toolButtonStyle: 2
34+
Visualization Manager:
35+
Class: ""
36+
Displays:
37+
- Alpha: 0.5
38+
Cell Size: 1
39+
Class: rviz/Grid
40+
Color: 160; 160; 164
41+
Enabled: true
42+
Line Style:
43+
Line Width: 0.029999999329447746
44+
Value: Lines
45+
Name: Grid
46+
Normal Cell Count: 0
47+
Offset:
48+
X: 0
49+
Y: 0
50+
Z: 0
51+
Plane: XY
52+
Plane Cell Count: 10
53+
Reference Frame: <Fixed Frame>
54+
Value: true
55+
- Class: rviz/TF
56+
Enabled: true
57+
Frame Timeout: 15
58+
Frames:
59+
All Enabled: false
60+
FSCar:
61+
Value: true
62+
FSCar/odom_local_ned:
63+
Value: true
64+
LidarCustom:
65+
Value: true
66+
front_center_custom_body:
67+
Value: false
68+
front_center_custom_body/static:
69+
Value: false
70+
front_center_custom_optical:
71+
Value: true
72+
front_center_custom_optical/static:
73+
Value: true
74+
front_left_custom_body:
75+
Value: false
76+
front_left_custom_body/static:
77+
Value: false
78+
front_left_custom_optical:
79+
Value: true
80+
front_left_custom_optical/static:
81+
Value: true
82+
front_right_custom_body:
83+
Value: false
84+
front_right_custom_body/static:
85+
Value: false
86+
front_right_custom_optical:
87+
Value: true
88+
front_right_custom_optical/static:
89+
Value: true
90+
world_enu:
91+
Value: false
92+
world_ned:
93+
Value: true
94+
Marker Scale: 1
95+
Name: TF
96+
Show Arrows: true
97+
Show Axes: true
98+
Show Names: true
99+
Tree:
100+
world_ned:
101+
FSCar:
102+
FSCar/odom_local_ned:
103+
LidarCustom:
104+
{}
105+
front_center_custom_body/static:
106+
{}
107+
front_center_custom_optical/static:
108+
{}
109+
front_left_custom_body/static:
110+
{}
111+
front_left_custom_optical/static:
112+
{}
113+
front_right_custom_body/static:
114+
{}
115+
front_right_custom_optical/static:
116+
{}
117+
front_center_custom_body:
118+
{}
119+
front_center_custom_optical:
120+
{}
121+
front_left_custom_body:
122+
{}
123+
front_left_custom_optical:
124+
{}
125+
front_right_custom_body:
126+
{}
127+
front_right_custom_optical:
128+
{}
129+
world_enu:
130+
{}
131+
Update Interval: 0
132+
Value: true
133+
- Class: rviz/Image
134+
Enabled: true
135+
Image Topic: /fsds_ros_bridge/FSCar/front_center_custom/Scene
136+
Max Value: 1
137+
Median window: 5
138+
Min Value: 0
139+
Name: Image
140+
Normalize Range: true
141+
Queue Size: 2
142+
Transport Hint: raw
143+
Unreliable: false
144+
Value: true
145+
- Alpha: 1
146+
Autocompute Intensity Bounds: true
147+
Autocompute Value Bounds:
148+
Max Value: 10
149+
Min Value: -10
150+
Value: true
151+
Axis: Z
152+
Channel Name: intensity
153+
Class: rviz/PointCloud2
154+
Color: 255; 255; 255
155+
Color Transformer: Intensity
156+
Decay Time: 0
157+
Enabled: true
158+
Invert Rainbow: false
159+
Max Color: 255; 255; 255
160+
Max Intensity: 4096
161+
Min Color: 0; 0; 0
162+
Min Intensity: 0
163+
Name: PointCloud2
164+
Position Transformer: XYZ
165+
Queue Size: 10
166+
Selectable: true
167+
Size (Pixels): 3
168+
Size (m): 0.009999999776482582
169+
Style: Flat Squares
170+
Topic: /fsds_ros_bridge/FSCar/lidar/LidarCustom
171+
Unreliable: false
172+
Use Fixed Frame: true
173+
Use rainbow: true
174+
Value: true
175+
Enabled: true
176+
Global Options:
177+
Background Color: 255; 255; 255
178+
Default Light: true
179+
Fixed Frame: world_enu
180+
Frame Rate: 30
181+
Name: root
182+
Tools:
183+
- Class: rviz/Interact
184+
Hide Inactive Objects: true
185+
- Class: rviz/MoveCamera
186+
- Class: rviz/Select
187+
- Class: rviz/FocusCamera
188+
- Class: rviz/Measure
189+
- Class: rviz/SetInitialPose
190+
Theta std deviation: 0.2617993950843811
191+
Topic: /initialpose
192+
X std deviation: 0.5
193+
Y std deviation: 0.5
194+
- Class: rviz/SetGoal
195+
Topic: /move_base_simple/goal
196+
- Class: rviz/PublishPoint
197+
Single click: true
198+
Topic: /clicked_point
199+
Value: true
200+
Views:
201+
Current:
202+
Class: rviz/Orbit
203+
Distance: 402.9212646484375
204+
Enable Stereo Rendering:
205+
Stereo Eye Separation: 0.05999999865889549
206+
Stereo Focal Distance: 1
207+
Swap Stereo Eyes: false
208+
Value: false
209+
Focal Point:
210+
X: 0.09086257964372635
211+
Y: -0.005134051665663719
212+
Z: -0.783257007598877
213+
Focal Shape Fixed Size: false
214+
Focal Shape Size: 0.05000000074505806
215+
Invert Z Axis: false
216+
Name: Current View
217+
Near Clip Distance: 0.009999999776482582
218+
Pitch: 0.3047972321510315
219+
Target Frame: world_view
220+
Value: Orbit (rviz)
221+
Yaw: 0.8321985602378845
222+
Saved: ~
223+
Window Geometry:
224+
Displays:
225+
collapsed: false
226+
Height: 2104
227+
Hide Left Dock: false
228+
Hide Right Dock: false
229+
Image:
230+
collapsed: false
231+
QMainWindow State: 000000ff00000000fd00000004000000000000025300000736fc020000000efb0000001200530065006c0065006300740069006f006e00000001e10000009b000000b000fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afc0000006e0000054a0000018200fffffffa000000010100000002fb0000002000630061006d005f00660072006f006e0074005f00630065006e0074006500720000000000ffffffff0000000000000000fb000000100044006900730070006c0061007900730100000000000001a6000001f700fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb0000000c00430061006d006500720061010000038f000000160000000000000000fb0000003600630061006d005f00660072006f006e0074005f006c006500660074005f00640065007000740068005f0070006c0061006e006100720200000af40000014e0000031c00000231fb0000001c00630061006d005f00660072006f006e0074005f006c0065006600740200000ac00000010f000002d700000196fb0000001e00630061006d005f00660072006f006e0074005f007200690067006800740200000b400000017000000286000001a7fb0000000a0049006d00610067006501000005c4000001e00000002600fffffffb0000000a0049006d00610067006500000006b4000000f00000000000000000000000010000015f00000736fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073010000006e000007360000013200fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e1000001970000000300000f000000005afc0100000002fb0000000800540069006d0065010000000000000f000000057100fffffffb0000000800540069006d0065010000000000000450000000000000000000000b360000073600000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
232+
Selection:
233+
collapsed: false
234+
Time:
235+
collapsed: false
236+
Tool Properties:
237+
collapsed: false
238+
Views:
239+
collapsed: false
240+
Width: 3840
241+
X: 0
242+
Y: 0

0 commit comments

Comments
 (0)