Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
382c4ed
Changed license
Juancams Dec 20, 2024
8962aa9
Create pull_request_template.md
Juancams Feb 14, 2025
c88e334
Create humble-devel.yaml
Juancams Feb 14, 2025
d912379
Update humble-devel.yaml
Juancams Feb 14, 2025
b18ca0c
Create dependencies.repos
Juancams Feb 14, 2025
289b9df
Update humble-devel.yaml
Juancams Feb 14, 2025
879db27
Update humble-devel.yaml
Juancams Feb 14, 2025
8cc05e2
Create humble.yaml
Juancams Feb 14, 2025
36db95c
Changed license
Juancams Feb 19, 2025
f535f4e
Added camera support
Juancams Feb 19, 2025
29274a3
Changed to convert with opencv
Juancams Feb 20, 2025
091acfe
Merge pull request #2 from Unitree-Go2-Robot/camera
Juancams Feb 21, 2025
e83eed8
Bug
Juancams Feb 21, 2025
c9770a5
Refactored all code into modules & added new modules/features
Juancams Mar 4, 2025
16e3bb6
Added packages dependencies
Juancams Mar 4, 2025
683f59f
Added traces, reset variables and parameters to not activate modules
Juancams Mar 4, 2025
3f90d1f
Test errors solved
Juancams Mar 4, 2025
150124b
Added Brightness & Switch services
Juancams Mar 4, 2025
ca08b09
Added Switch Obstacles Avoidance service
Juancams Mar 4, 2025
abb6640
Added autostart
Juancams Mar 6, 2025
07e3418
Flake8
Juancams Mar 7, 2025
983fda8
Flake8
Juancams Mar 7, 2025
ce75c0d
Flake8
Juancams Mar 7, 2025
bec7747
Camera calibration & publish camera_info
Juancams Mar 10, 2025
7034eef
Uncrustify
Juancams Mar 10, 2025
79fb13c
Solved some bugs
Juancams Mar 11, 2025
dea2ddb
Added response message to BodyHeight service
Juancams Mar 11, 2025
4032501
Improve lens correction for RT
jmguerreroh Mar 18, 2025
3dea0cb
Merge pull request #4 from jmguerreroh/refactoring-features
Juancams Mar 18, 2025
79f1f7a
Solved errors
Juancams Mar 18, 2025
c44d07e
Removed callback_groups
Juancams Jun 4, 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
13 changes: 13 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
### Description

Please explain the changes you made, including a reference to the related issue if applicable.

### Checklist
- [ ] I have formatted the code to pass the CI.
- [ ] Extend the test.

### Screenshots / Images / Videos
Please add here all the media that shows the system in operation.

### People involved
Please use @mentions to name people who have contributed to this PR.
30 changes: 30 additions & 0 deletions .github/workflows/humble-devel.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: humble

on:
push:
branches:
- humble-devel
pull_request:
branches:
- humble-devel
schedule:
- cron: "0 7 * * 1"

jobs:
ROS2:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup ROS 2 environment
uses: ros-tooling/setup-ros@0.7.9
with:
ros-distro: humble

- name: Build ROS 2 package
uses: ros-tooling/action-ros-ci@0.3.13
with:
package-name: go2_driver unitree_go unitree_api go2_interfaces
vcs-repo-file-url: https://raw.githubusercontent.com/Unitree-Go2-Robot/go2_driver/refs/heads/humble-devel/dependencies.repos
target-ros2-distro: humble
30 changes: 30 additions & 0 deletions .github/workflows/humble.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: humble

on:
push:
branches:
- humble
pull_request:
branches:
- humble
schedule:
- cron: "0 7 * * 1"

jobs:
ROS2:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup ROS 2 environment
uses: ros-tooling/setup-ros@0.7.9
with:
ros-distro: humble

- name: Build ROS 2 package
uses: ros-tooling/action-ros-ci@0.3.13
with:
package-name: go2_driver unitree_go unitree_api go2_interfaces
vcs-repo-file-url: https://raw.githubusercontent.com/Unitree-Go2-Robot/go2_driver/refs/heads/humble/dependencies.repos
target-ros2-distro: humble
18 changes: 17 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()

add_definitions(-DRCLCPP_ENABLE_TOPIC_STATISTICS=0)

find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(rclcpp_lifecycle REQUIRED)
Expand All @@ -16,6 +18,9 @@ find_package(unitree_go REQUIRED)
find_package(unitree_api REQUIRED)
find_package(tf2_ros REQUIRED)
find_package(go2_interfaces REQUIRED)
find_package(cv_bridge REQUIRED)
find_package(OpenCV REQUIRED)
find_package(OpenSSL REQUIRED)

set(dependencies
rclcpp
Expand All @@ -28,15 +33,26 @@ set(dependencies
unitree_api
tf2_ros
go2_interfaces
cv_bridge
OpenCV
OpenSSL
)

include_directories(include)

add_library(${PROJECT_NAME} SHARED
src/go2_driver/go2_driver.cpp
src/go2_driver/modules/go2_camera.cpp
src/go2_driver/modules/go2_handle_services.cpp
src/go2_driver/modules/go2_tts.cpp
src/go2_driver/modules/go2_vui.cpp
src/go2_driver/modules/go2_odometry.cpp
src/go2_driver/modules/go2_joint_states.cpp
src/go2_driver/modules/go2_switch_obstacles_avoidance.cpp
)

ament_target_dependencies(${PROJECT_NAME} ${dependencies})
target_link_libraries(${PROJECT_NAME} avcodec avformat avutil swscale OpenSSL::SSL OpenSSL::Crypto ${OpenCV_LIBS})

rclcpp_components_register_nodes(${PROJECT_NAME} "go2_driver::Go2Driver")

Expand All @@ -53,7 +69,7 @@ install(DIRECTORY include/
DESTINATION include
)

install(DIRECTORY launch
install(DIRECTORY launch config
DESTINATION share/${PROJECT_NAME}
)

Expand Down
19 changes: 19 additions & 0 deletions config/camera_calibration.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
go2_driver:
ros__parameters:
frame_id: "camera_frame"
distortion_model: "plumb_bob"
width: 1280
height: 720
d: [ -0.3899037066336244, 0.1788088900468458, 0.0002001278572207758, -0.000684749815310552, -0.044162166777284 ]
k: [ 806.0577552762542, 0, 632.4742958402456, 0, 805.5558008931949, 346.8794920158575, 0, 0, 1 ]
r: [ 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0 ]
p: [ 806.0577552762542, 0, 632.4742958402456, 0, 0, 805.5558008931949, 346.8794920158575, 0, 0, 0, 1, 0 ]
binning_x: 0
binning_y: 0
roi:
x_offset: 0
y_offset: 0
height: 0
width: 0
do_rectify: false

13 changes: 13 additions & 0 deletions dependencies.repos
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
repositories:
go2_interfaces:
type: git
url: https://github.com/Unitree-Go2-Robot/go2_interfaces.git
version: humble
unitree_api:
type: git
url: https://github.com/Unitree-Go2-Robot/unitree_api.git
version: main
unitree_go:
type: git
url: https://github.com/Unitree-Go2-Robot/unitree_go.git
version: main
79 changes: 0 additions & 79 deletions include/go2_driver/go2_api_id.hpp

This file was deleted.

Loading