Skip to content

Commit

Permalink
Merge pull request #79 from abizovnuralem/firmware_1_1_1_update
Browse files Browse the repository at this point in the history
Firmware 1 1 1 update
  • Loading branch information
abizovnuralem authored Sep 11, 2024
2 parents 4faf698 + f2b78ef commit c41de8c
Show file tree
Hide file tree
Showing 6 changed files with 286 additions and 64 deletions.
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
![ROS2 Build](https://github.com/abizovnuralem/go2_ros2_sdk/actions/workflows/ros_build.yaml/badge.svg)
[![License](https://img.shields.io/badge/license-BSD--2-yellow.svg)](https://opensource.org/licenses/BSD-2-Clause)

> [!IMPORTANT]
> The new firmware update, that comes from September 2024, has a different connection method with the app. Refer to https://github.com/abizovnuralem/go2_ros2_sdk/issues/74, Currenly this SDK only supports CycloneDDS. In order to use WebRTC you need to roll back to the previous 1.0.25 firmware.

We are happy to present you our integration of the Unitree Go2 with ROS2 over Wi-Fi, that was designed by the talented [@tfoldi](https://github.com/tfoldi). You can explore his groundbreaking work at [go2-webrtc](https://github.com/tfoldi/go2-webrtc).

Expand All @@ -28,7 +25,7 @@ If you are using WebRTC (Wi-Fi) protocol, close the connection with a mobile app
6. Go2 topics info in real time :white_check_mark:
7. Foot force sensors info in real time :white_check_mark:
8. Lidar stream (added pointCloud2) :white_check_mark:
9. Camera stream :white_check_mark:
9. Camera stream (Currently is not working with a new Firmware update)
10. Foxglove bridge :white_check_mark:
11. Laser Scan :white_check_mark:
12. Multi robot support :white_check_mark:
Expand Down Expand Up @@ -86,7 +83,8 @@ cd ros2_ws
git clone --recurse-submodules https://github.com/abizovnuralem/go2_ros2_sdk.git src
sudo apt install ros-$ROS_DISTRO-image-tools
sudo apt install ros-$ROS_DISTRO-vision-msgs
sudo apt install python3-pip clang

sudo apt install python3-pip clang portaudio19-dev
cd src
pip install -r requirements.txt
cd ..
Expand Down Expand Up @@ -310,7 +308,15 @@ If you are running ROS2 under WSL2 - you may need to configure Joystick\Gamepad
## Thanks
Special thanks to @tfoldi, @legion1581, @budavariam, @alex.lin and TheRoboVerse community!
Special thanks to:
1. @tfoldi (Tamas) for his idea and talent to create a webrtc connection method between python and unitree GO2;
2. @budavariam for helping with lidar issues;
3. @legion1581 for a new webrtc method, that is working with 1.1.1 firmware update;
4. @alex.lin for his passion in ros1 ingration;
5. @alansrobotlab for his passion in robotics and helping me to debug new webrtc method;
6. @giangalv (Gianluca Galvagn) for helping me debug new issues with webrtc;
7. Many many other open source contributors! and TheRoboVerse community!
## License
Expand Down
1 change: 1 addition & 0 deletions go2_robot_sdk/go2_robot_sdk/go2_driver_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,7 @@ async def run(self, conn, robot_num):

if self.conn_type == 'webrtc':
await self.conn[robot_num].connect()
# await self.conn[robot_num].data_channel.disableTrafficSaving(True)

while True:
self.joy_cmd(robot_num)
Expand Down
32 changes: 16 additions & 16 deletions go2_robot_sdk/launch/robot.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,14 @@ def generate_launch_description():
arguments=[urdf]
),
)
urdf_launch_nodes.append(
Node(
package='ros2_go2_video',
executable='ros2_go2_video',
parameters=[{'robot_ip': robot_ip_lst[0],
'robot_token': robot_token}],
),
)
# urdf_launch_nodes.append(
# Node(
# package='ros2_go2_video',
# executable='ros2_go2_video',
# parameters=[{'robot_ip': robot_ip_lst[0],
# 'robot_token': robot_token}],
# ),
# )
urdf_launch_nodes.append(
Node(
package='pointcloud_to_laserscan',
Expand Down Expand Up @@ -159,14 +159,14 @@ def generate_launch_description():
arguments=[urdf]
),
)
urdf_launch_nodes.append(
Node(
package='ros2_go2_video',
executable='ros2_go2_video',
parameters=[{'robot_ip': robot_ip_lst[i],
'robot_token': robot_token}],
),
)
# urdf_launch_nodes.append(
# Node(
# package='ros2_go2_video',
# executable='ros2_go2_video',
# parameters=[{'robot_ip': robot_ip_lst[i],
# 'robot_token': robot_token}],
# ),
# )
urdf_launch_nodes.append(
Node(
package='pointcloud_to_laserscan',
Expand Down
27 changes: 27 additions & 0 deletions go2_robot_sdk/scripts/go2_constants.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
# Copyright (c) 2024, RoboVerse community
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

# A NEW WEB_RTC_COMM WAS ORIGINALY FORKED from https://github.com/legion1581/go2_webrtc_connect
# Big thanks for your passion! @legion1581 (The RoboVerse Discord Group)


ROBOT_CMD = {
"Damp": 1001,
"BalanceStand": 1002,
Expand Down
Loading

0 comments on commit c41de8c

Please sign in to comment.