Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
325fdbb
Update payloadsdk.h for GREMSY-01 UDP
IanOMHiggins Nov 25, 2024
5a40553
Add VIO=1 cmake parameter to make the package buildable with a simple…
ian-higgins Jan 21, 2025
f3e1af9
add backup for original readme. README.md will be edited for our appl…
ian-higgins Jan 21, 2025
dd52b35
Update README.md for this repo rather than its parent
IanOMHiggins Jan 21, 2025
b1304a3
Update README.md with dependency installs
IanOMHiggins Jan 24, 2025
3ce5e8d
Added support for topic /move_gimbal_angle. Builds, subscribes, and s…
ian-higgins Jan 24, 2025
caf261e
Update README.md with new repo name
IanOMHiggins Jan 24, 2025
f8b74bd
adding config and gimbal2drone follow logic
Jun 19, 2025
a641b32
validating configs and launch file
Jun 19, 2025
8299f08
modified package and config for config modularity
jfkeller Jul 8, 2025
6121433
reverted to og cmake and added launch for gimbal
jfkeller Jul 9, 2025
0b6e642
launch file working with cmake adjustment
jfkeller Jul 9, 2025
925f9de
modified launch for modularity control via config
jfkeller Jul 10, 2025
c2c2e33
added gremsy alignment node v1
jfkeller Jul 10, 2025
25aae1f
made launch file parse config and launch now launches new node
jfkeller Jul 10, 2025
580f6d3
init version of gimbal changes compile
jfkeller Jul 11, 2025
470828c
node runs but fails to lock gimbal relative to drone body
jfkeller Jul 11, 2025
3540598
gimbal now successfully follows body of drome
jfkeller Jul 11, 2025
fe23aaf
Merge branch 'payloadsdk_v2' into alejandro/configV2
alejandroXmagno Jul 11, 2025
d746cf2
added camera moving and streaming nodes
jfkeller Jul 15, 2025
7b61bcd
Gimbal camera now can point 45 deg down or whatever you want via comm…
jfkeller Jul 17, 2025
95c9b9d
Add IR camera stream node and fix CMakeLists.txt
jfkeller Jul 24, 2025
b780ed2
added overlay preventer to code
jfkeller Jul 24, 2025
65b439e
enabled both ir and rgb on start for testing.
jfkeller Jul 24, 2025
0f35297
gimbal now points 45 down
jfkeller Jul 25, 2025
f59855e
fixed topic issue to pure Image
jfkeller Jul 30, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
180 changes: 173 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.8)

project (PayloadSDK)
project (PayloadSDK LANGUAGES C CXX)

set(CMAKE_BUILD_TYPE Debug)

Expand All @@ -22,13 +22,16 @@ message("-- ZIO: ${ZIO}")
add_definitions(-DZIO=${ZIO})
endif(ZIO)

add_definitions(-DVIO=1)

find_package(PkgConfig REQUIRED)
#Use Pkg-config to configure GStreamer

# Use Pkg-config to configure GStreamer
pkg_search_module(GLIB REQUIRED glib-2.0)
pkg_check_modules(GST REQUIRED
gstreamer-1.0
gstreamer-video-1.0
gstreamer-app-1.0
gstreamer-1.0>=1.0
gstreamer-video-1.0>=1.0
gstreamer-app-1.0>=1.0
)

add_subdirectory(libs)
Expand All @@ -42,4 +45,167 @@ add_subdirectory(tests/demo_project)
endif(VIO)
if (GHADRON)
add_subdirectory(tests/ghadron_project)
endif(GHADRON)
endif(GHADRON)

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()

# find dependencies
find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(std_msgs REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(cv_bridge REQUIRED)
find_package(OpenCV REQUIRED)

pkg_check_modules(JSONCPP jsoncpp)
find_package(CURL REQUIRED)

set(PAYLOADSDKLIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/libs)
include_directories(${PAYLOADSDKLIB_DIR}
${PAYLOADSDKLIB_DIR}/third-party/mavlink/include
${PAYLOADSDKLIB_DIR}/gSDK/src/mavlink/include/mavlink/v2.0
${PAYLOADSDKLIB_DIR}/gSDK/src
${GST_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
${CURL_INCLUDE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/src
${CMAKE_CURRENT_SOURCE_DIR}/include
)

# Common source files (if any)
set(COMMON_SOURCES
# Add any common source files here if needed
)

# === Node 1: Gimbal Control ===
add_executable(gremsy_gimbal_node src/gremsy_gimbal_node.cpp ${COMMON_SOURCES})
ament_target_dependencies(gremsy_gimbal_node
rclcpp
std_msgs
geometry_msgs
)

target_link_libraries(gremsy_gimbal_node
PayloadSDK
${CMAKE_THREAD_LIBS_INIT}
${GST_LIBRARIES}
${JSONCPP_LIBRARIES}
${CURL_LIBRARIES}
stdc++fs
)

# === Node 2: Camera Streaming ===
add_executable(gremsy_camera_stream_node src/gremsy_camera_stream_node.cpp ${COMMON_SOURCES})
ament_target_dependencies(gremsy_camera_stream_node
rclcpp
std_msgs
geometry_msgs
sensor_msgs
cv_bridge
OpenCV
)

target_include_directories(gremsy_camera_stream_node PRIVATE
${OpenCV_INCLUDE_DIRS}
${GST_INCLUDE_DIRS}
)

target_link_libraries(gremsy_camera_stream_node
PayloadSDK
${CMAKE_THREAD_LIBS_INIT}
${GST_LIBRARIES}
${JSONCPP_LIBRARIES}
${CURL_LIBRARIES}
${OpenCV_LIBS}
stdc++fs
)

# === Node 3: Camera Movement ===
add_executable(gremsy_camera_move_node src/gremsy_camera_move_node.cpp ${COMMON_SOURCES})
ament_target_dependencies(gremsy_camera_move_node
rclcpp
std_msgs
geometry_msgs
)

target_link_libraries(gremsy_camera_move_node
PayloadSDK
${CMAKE_THREAD_LIBS_INIT}
${GST_LIBRARIES}
${JSONCPP_LIBRARIES}
${CURL_LIBRARIES}
stdc++fs
)

# === Node 4: Camera Stream (IR) ===
add_executable(gremsy_camera_stream_ir src/gremsy_camera_stream_ir.cpp ${COMMON_SOURCES})

# Add dependencies
ament_target_dependencies(gremsy_camera_stream_ir
rclcpp
std_msgs
geometry_msgs
sensor_msgs
cv_bridge
OpenCV
)

target_include_directories(gremsy_camera_stream_ir PRIVATE
${OpenCV_INCLUDE_DIRS}
${GST_INCLUDE_DIRS}
)

target_link_libraries(gremsy_camera_stream_ir
PayloadSDK
${CMAKE_THREAD_LIBS_INIT}
${GST_LIBRARIES}
${JSONCPP_LIBRARIES}
${CURL_LIBRARIES}
${OpenCV_LIBS}
stdc++fs
)


# Install all executables
install(TARGETS
gremsy_gimbal_node
gremsy_camera_stream_node
gremsy_camera_move_node
gremsy_camera_stream_ir
DESTINATION lib/${PROJECT_NAME}
)

# Install launch files
install(DIRECTORY launch/
DESTINATION share/${PROJECT_NAME}/launch
FILES_MATCHING PATTERN "*.py"
)

# Install config files
install(DIRECTORY config/
DESTINATION share/${PROJECT_NAME}/config
FILES_MATCHING PATTERN "*.yaml"
)

# Install header files
install(DIRECTORY src/
DESTINATION share/${PROJECT_NAME}/include
FILES_MATCHING PATTERN "*.hpp"
)

if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
# the following line skips the linter which checks for copyrights
# comment the line when a copyright and license is added to all source files
set(ament_cmake_copyright_FOUND TRUE)
# the following line skips cpplint (only works in a git repo)
# comment the line when this package is in a git repo and when
# a copyright and license is added to all source files
set(ament_cmake_cpplint_FOUND TRUE)
ament_lint_auto_find_test_dependencies()
endif()

ament_package()
33 changes: 4 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,16 @@
# PayloadSdk
This repo is officially SDK for all Gremsy's Payloads
# gremsy_ros2
This repo controls a Gremsy VIO gimbal over UDP via ROS2 commands. Forked from Gremsy's PayloadSdk repo.

## Hardware
- Ubuntu PC (x86_64)
- Jetson platform (aarch64)
- Raspberry Pi
- Qualcomm RB5165
## Clone the project

## Clone the project
```
git clone -b payloadsdk_v2 https://github.com/Gremsy/PayloadSdk.git
git clone -b payloadsdk_v2 https://github.com/castacks/GremsySdk.git
```

## Hardware setup
PayloadSDK supports 2 control conections, that's configured at payloadsdk.h:

![Image](PayloadSDK_HW_Setup.png)

**Figure 1:** Hardware setup use Ethernet or UART connection

## How to build
- Install required lib
```
sudo apt-get install libcurl4-openssl-dev libjsoncpp-dev
sudo apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
```

- Build project
<pre>
cd PayloadSdk
mkdir build && cd build

cmake -D<b>payload</b> ../
<i>e.g. cmake -DVIO=1 ../</i>
<i> cmake -DGHADRON=1 ../</i>
<i> cmake -DZIO=1 ../</i>

make -j6

</pre>
41 changes: 41 additions & 0 deletions README.original.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# PayloadSdk
This repo is officially SDK for all Gremsy's Payloads

## Hardware
- Ubuntu PC (x86_64)
- Jetson platform (aarch64)
- Raspberry Pi
- Qualcomm RB5165

## Clone the project
```
git clone -b payloadsdk_v2 https://github.com/Gremsy/PayloadSdk.git
```

## Hardware setup
PayloadSDK supports 2 control conections, that's configured at payloadsdk.h:

![Image](PayloadSDK_HW_Setup.png)

**Figure 1:** Hardware setup use Ethernet or UART connection

## How to build
- Install required lib
```
sudo apt-get install libcurl4-openssl-dev libjsoncpp-dev
sudo apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
```

- Build project
<pre>
cd PayloadSdk
mkdir build && cd build

cmake -D<b>payload</b> ../
<i>e.g. cmake -DVIO=1 ../</i>
<i> cmake -DGHADRON=1 ../</i>
<i> cmake -DZIO=1 ../</i>

make -j6

</pre>
Loading