-
Notifications
You must be signed in to change notification settings - Fork 0
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 a certificate creation script #69
base: master
Are you sure you want to change the base?
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
echo "Generating web interface certs..." | ||
cd certificates | ||
curl -JLO "https://dl.filippo.io/mkcert/latest?for=linux/amd64" | ||
chmod +x mkcert-v*-linux-amd64 | ||
sudo cp mkcert-v*-linux-amd64 /usr/local/bin/mkcert | ||
CAROOT=`pwd` mkcert --install | ||
mkdir -p ~/.local/share/mkcert | ||
rm -rf ~/.local/share/mkcert/root* | ||
cp root* ~/.local/share/mkcert | ||
mkcert ${HELLO_FLEET_ID} ${HELLO_FLEET_ID}.local ${HELLO_FLEET_ID}.dev localhost 127.0.0.1 0.0.0.0 ::1 | ||
rm mkcert-v*-linux-amd64 | ||
cd .. | ||
touch .env | ||
echo certfile=${HELLO_FLEET_ID}+6.pem >> .env | ||
echo keyfile=${HELLO_FLEET_ID}+6-key.pem >> .env | ||
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. Nit: newline at EOF. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
import pathlib | ||
import pprint | ||
import subprocess | ||
import sys | ||
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. You should rebase on top of |
||
from typing import Dict, Optional, Tuple | ||
|
||
# Third-party imports | ||
|
@@ -94,7 +95,13 @@ def save_urdf_file(robot, file_name): | |
print("Loading URDF from:") | ||
print(urdf_filename) | ||
print("The specialized URDFs will be derived from this URDF.") | ||
robot = ud.Robot.from_xml_file(urdf_filename) | ||
try: | ||
robot = ud.Robot.from_xml_file(urdf_filename) | ||
except FileNotFoundError: | ||
print( | ||
f"The URDF file was not found in path {urdf_filename}. Unable to create specialized URDFs." | ||
) | ||
sys.exit(0) | ||
|
||
# Change any joint that should be immobile for end effector IK into a fixed joint | ||
for j in robot.joint_map.keys(): | ||
|
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.
Now that we've moved this script to this repo, its possible that users will run it from a different folder (e.g., the workspace root). I'd recommend adding a check for whether the
certificates
director exists, as a heuristic for whether the user is in thestretch_web_teleop
folder. If it does not exist, the script should echo a message telling users it must be run fromstretch_web_teleop
, and exit.