-
Notifications
You must be signed in to change notification settings - Fork 3
Add G1 Support #85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add G1 Support #85
Conversation
…trol and navigation
- Updated launch files (base_control_launch.py, nav2_launch.py, slam_launch.py) to use consistent string formatting and improved readability. - Enhanced the setup.py file to ensure proper packaging of resources and dependencies. - Cleaned up URDF file for better formatting and consistency. - Refactored orchestrator_api.py and map_manager.py to improve code clarity and maintainability. - Adjusted process_manager.py to streamline process launching based on robot type.
openminddev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to capitalize G or not? We should use g1 and go2 or G1 and Go2. If the robot type is not these options, we should exit the program.
| """ | ||
|
|
||
| def __init__(self, maps_directory: str, logger=None): | ||
| def __init__(self, maps_directory: str, robot_type: str = "default", logger=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| def __init__(self, maps_directory: str, robot_type: str = "default", logger=None): | |
| def __init__(self, maps_directory: str, robot_type: str = "go2", logger=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can go with lower case
| # Debug logging (uncomment if needed) | ||
| # self.get_logger().info( | ||
| # f'Odom - Pos: [{odom_msg.pose.pose.position.x:.3f}, ' | ||
| # f'{odom_msg.pose.pose.position.y:.3f}, {odom_msg.pose.pose.position.z:.3f}], ' | ||
| # f'Vel: [{odom_msg.twist.twist.linear.x:.3f}, ' | ||
| # f'{odom_msg.twist.twist.linear.y:.3f}, {odom_msg.twist.twist.linear.z:.3f}]', | ||
| # throttle_duration_sec=1.0 | ||
| # ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self.get_logger().debug
g1_sdk/g1_sdk/g1_jointstate.py
Outdated
| # self.get_logger().error(f'Error processing low state: {str(e)}') | ||
| import traceback | ||
|
|
||
| # self.get_logger().error(f'Traceback: {traceback.format_exc()}') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please clean it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request adds comprehensive support for the Unitree G1 humanoid robot by creating a new g1_sdk package with navigation, SLAM, and robot control capabilities. The changes enable robot-type-specific operation through environment-based configuration.
Key Changes:
- Created complete G1 SDK package with URDF, launch files, and ROS2 nodes
- Modified orchestrator to support multi-robot operation via
ROBOT_TYPEenvironment variable - Implemented RTAB-Map SLAM for G1 (vs. slam_toolbox for GO2)
Reviewed Changes
Copilot reviewed 22 out of 182 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| orchestrator/orchestrator/managers/process_manager.py | Added robot_type parameter to select correct SDK package (g1_sdk vs go2_sdk) |
| orchestrator/orchestrator/managers/map_manager.py | Added robot-specific map saving (RTAB-Map for G1, slam_toolbox for GO2) |
| orchestrator/orchestrator/core/orchestrator_api.py | Integrated ROBOT_TYPE environment variable into manager initialization |
| go2_sdk/package.xml | Updated package description to reflect multi-robot support |
| g1_sdk/* | New package with URDF, launch files, configs, and ROS2 nodes for G1 robot |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This pull request introduces several new configuration and code files to the
g1_sdkpackage, focusing on enabling and tuning navigation, SLAM, and joint state publishing for the G1 robot. The changes add critical navigation and mapping parameters, a new ROS node for publishing joint states, and an RViz configuration for visualization.Key changes include:
Navigation and Robot Behavior Configuration:
nav2_parameters.yamlwith extensive parameter tuning for navigation, controller, costmaps, planner, smoother, behavior, waypoint follower, and velocity smoother servers. Notable adjustments include increased timeouts, more tolerant progress and goal checkers, reduced costmap footprint, less aggressive inflation/cost scaling, and enabled sideways/backward motion. These changes are tailored for improved navigation robustness and safety for the G1 robot.SLAM Configuration:
slam.yamlwith parameters forslam_toolbox, including frame definitions, scan and motion thresholds, loop closure, scan matching, and solver settings. These are tuned for improved mapping and localization, especially on slopes and with the G1's specific sensors.Robot State and Visualization:
g1_jointstate.py, a new ROS2 node that subscribes to Unitree's low-level state (LowState) and publishes standardized ROSJointStatemessages. This enables integration with ROS tools and visualization of the G1's joint positions.