-
Notifications
You must be signed in to change notification settings - Fork 5
Elham/go1 #31
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
base: main
Are you sure you want to change the base?
Elham/go1 #31
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ | |
from mim_control.robot_impedance_controller import RobotImpedanceController | ||
from bullet_utils.env import BulletEnvWithGround | ||
from robot_properties_solo.solo12wrapper import Solo12Robot, Solo12Config | ||
from robot_properties_go1.go1wrapper import Go1Robot, Go1Config | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. would it be possible to add a try catch here for the optional dependencies? for example one wants to run on solo but not on go1 and still need to install go1 to run the demo... WDYT? |
||
from robot_properties_bolt.bolt_wrapper import BoltRobot, BoltConfig | ||
|
||
|
||
|
@@ -29,6 +30,10 @@ def demo(robot_name): | |
robot = BoltRobot() | ||
robot = env.add_robot(robot) | ||
robot_config = BoltConfig() | ||
elif robot_name == "go1": | ||
robot = Go1Robot() | ||
robot = env.add_robot(robot) | ||
robot_config = Go1Config() | ||
else: | ||
raise RuntimeError( | ||
"Robot name [" + str(robot_name) + "] unknown. " | ||
|
@@ -83,11 +88,16 @@ def demo(robot_name): | |
parser.add_argument( | ||
"--bolt", help="Demonstrate Bolt.", action="store_true" | ||
) | ||
parser.add_argument( | ||
"--go1", help="Demonstrate Bolt.", action="store_true" | ||
) | ||
args = parser.parse_args() | ||
if args.solo: | ||
robot_name = "solo" | ||
elif args.bolt: | ||
robot_name = "bolt" | ||
elif args.go1: | ||
robot_name = "go1" | ||
else: | ||
robot_name = "solo" | ||
|
||
|
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 miss something in the CMakeLists.txt to check if those optional dependencies are installed or not...
It is not needed per say but would be nice IMHO.