From fffdf20b9a48a185548d47fddab3849303e77b2b Mon Sep 17 00:00:00 2001 From: TiaSinghania Date: Wed, 14 Aug 2024 16:14:19 -0700 Subject: [PATCH 1/3] initial reorganization --- README.md | 134 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 70 insertions(+), 64 deletions(-) diff --git a/README.md b/README.md index 67387a90..6f78dc3c 100755 --- a/README.md +++ b/README.md @@ -1,96 +1,71 @@ # RoboBuggy2 -A complete re-write of the old RoboBuggy. +A complete re-write of the old RoboBuggy. This code was run for RD23, RD24 and RD25, on both NAND and Short Circuit. + ---- ## Table of Contents - - Installation - - Quickstart - - Development + - Installation and Initial Setup + - Launching Code + - Code Structure and Documentation --- -## Installation (for Windows) -### Install Softwares: WSL, Ubuntu, Foxglove -- Go to Microsoft Store to install "Ubuntu 20.04.6 LTS". -- Go install Foxglove https://foxglove.dev/. +## Installation and Initial Setup +### Necessary + Recommended Software +TODO: add explanations for what each software is for +- Docker +- Foxglove +- VSCode (recommended) +- Git (recommended) + ### Docker -- You will need [Docker](https://docs.docker.com/get-docker/) installed. +- Installation instructions here: https://docs.docker.com/get-docker/ -### Set up repo in WSL -- To set up ssh key, follow this link: [Connecting to GitHub with SSH](https://docs.github.com/en/authentication/connecting-to-github-with-ssh). -- Note: Ensure that the SSH keys are generated while in the WSL terminal -- In the website above, see these two pages: [Generating a new SSH key and adding it to the ssh-agent](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) and ["Adding a new SSH key to your GitHub account"](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account). +### Foxglove +- Installation instructions here: https://foxglove.dev/ -### Clone -- In your terminal type: `$ git clone https://github.com/CMU-Robotics-Club/RoboBuggy2.git`. -- The clone link above is find in github: code -> local -> Clone SSH. -- ![image](https://github.com/CMU-Robotics-Club/RoboBuggy2/assets/116482510/8ea809f7-35f9-4517-b98d-42e2e869d233) +### VSCode +### Git -### ROS -- Navigate to `/rb_ws`. This is the catkin workspace where we will be doing all our ROS stuff. -- To build the ROS workspace and source it, run: - catkin_make - source /rb_ws/devel/setup.bash # sets variables so that our package is visible to ROS commands -- To learn ROS on your own, follow the guide on https://wiki.ros.org/ROS/Tutorials. Start from the first and install Ros using a Virtual Machine. -## Installation (for MacOS - M2) -### Install Softwares: Docker, Foxglove -- Go install Foxglove https://foxglove.dev/. -- You will need [Docker](https://docs.docker.com/get-docker/) installed. +## TODO: other docs which i don't know if they're necessary +### Install Softwares: WSL, Ubuntu +- Go to Microsoft Store to install "Ubuntu 20.04.6 LTS". TODO: is this actually necessary? +### Set up repo in WSL TODO: again, do we actually need wsl? +- To set up ssh key, follow this link: [Connecting to GitHub with SSH](https://docs.github.com/en/authentication/connecting-to-github-with-ssh). +- Note: Ensure that the SSH keys are generated while in the WSL terminal +- In the website above, see these two pages: [Generating a new SSH key and adding it to the ssh-agent](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) and ["Adding a new SSH key to your GitHub account"](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account). + +### TODO: this is setup for MacOS ### Set up repository - To set up ssh key, follow this link: [Connecting to GitHub with SSH](https://docs.github.com/en/authentication/connecting-to-github-with-ssh). - Note: Ensure that the SSH keys are generated while in the WSL terminal - In the website above, see these two pages: [Generating a new SSH key and adding it to the ssh-agent](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) and ["Adding a new SSH key to your GitHub account"](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account). -### Clone -- In your terminal type: `$ git clone git@github.com:CMU-Robotics-Club/RoboBuggy.git`. + +## Initial Setup + +### Clone the Repository +This is so you can edit our codebase locally, and sync your changes with the rest of the team through Git. +- In your terminal type: `$ git clone https://github.com/CMU-Robotics-Club/RoboBuggy2.git`. - The clone link above is find in github: code -> local -> Clone SSH. - ![image](https://github.com/CMU-Robotics-Club/RoboBuggy2/assets/116482510/8ea809f7-35f9-4517-b98d-42e2e869d233) ### ROS +TODO: what is this actually doing? explain what these lines of code do - Navigate to `/rb_ws`. This is the catkin workspace where we will be doing all our ROS stuff. - To build the ROS workspace and source it, run: catkin_make source /rb_ws/devel/setup.bash # sets variables so that our package is visible to ROS commands -- To learn ROS on your own, follow the guide on https://wiki.ros.org/ROS/Tutorials. Start from the first and install Ros using a Virtual Machine. - ---- -## Open Docker -- Use `cd` to change the working directory to be `RoboBuggy2` -- Then do `./setup_dev.sh` in the main directory (RoboBuggy2) to launch the docker container. Utilize the `--no-gpu`, `--force-gpu`, and `--run-testing` flags as necessary. -- Then you can go in the docker container using the `docker exec -it robobuggy2-main-1 bash`. -- When you are done, type Ctrl+C and use `$exit` to exit. - -## 2D Simulation -- Boot up the docker container -- Run `roslaunch buggy sim_2d_single.launch` to simulate 1 buggy -- See `rb_ws/src/buggy/launch/sim_2d_single.launch` to view all available launch options -- Run `roslaunch buggy sim_2d_2buggies.launch` to simulate 2 buggies - -Screenshot 2023-11-13 at 3 18 30 PM - -- See `rb_ws/src/buggy/launch/sim_2d_2buggies.launch` to view all available launch options - - The buggy starting positions can be changed using the `sc_start_pos` and `nand_start_pos` arguments (can pass as a key to a dictionary of preset start positions in engine.py, a single float for starting distance along planned trajectory, or 3 comma-separated floats (utm east, utm north, and heading)) -- To prevent topic name collision, a topic named `t` associated with buggy named `x` have format `x/t`. The names are `SC` and `Nand` in the 2 buggy simulator. In the one buggy simulator, the name can be defined as a launch arg. -- See [**Foxglove Visualization**](#foxglove-visualization) for visualizing the simulation. Beware that since topic names are user-defined, you will need to adjust the topic names in each panel. - -### Simulator notes -Feedback: -- Longitude + Latitude for Foxglove visualization on map: `/state/pose_navsat` (sensor_msgs/NavSatFix) -- UTM coordinates (assume we're in Zone 17T): `/sim_2d/utm` (geometry_msgs/Pose - position.x = Easting meters , position.y = Northing meters, position.z = heading in degrees from East axis + is CCW) -- INS Simulation: `/nav/odom` (nsg_msgs/Odometry) (**Noise** is implemented to vary ~1cm) -Commands: -- Steering angle: `/buggy/steering` in degrees (std_msgs/Float64) -- Velocity: `/buggy/velocity` in m/s (std_msgs/Float64) +- To learn ROS on your own, follow the guide on https://wiki.ros.org/ROS/Tutorials. TODO: add recommendations on which aspects of ROS we use most -## Foxglove Visualization +### Foxglove Visualization - Foxglove is used to visualize both the simulator and the actual buggy's movements. - First, you need to import the layout definition into Foxglove. On the top bar, click Layout, then "Import from file". - ![image](https://github.com/CMU-Robotics-Club/RoboBuggy2/assets/116482510/2aa04083-46b3-42a5-bcc1-99cf7ccdb3d2) @@ -100,8 +75,9 @@ Commands: - Open Foxglove, choose the third option "start link". - ![image](https://github.com/CMU-Robotics-Club/RoboBuggy2/assets/116482510/66965d34-502b-4130-976e-1419c0ac5f69) -## X11 Setup -Instructions: + +### X11 Setup (recommended) +TODO: explain what X11 is for (i think it's only for the manual velocity updater in the sim?) - Install the appropriate X11 server on your computer for your respective operating systems (Xming for Windows, XQuartz for Mac, etc.). - Mac: In XQuartz settings, ensure that the "Allow connections from network clients" under "Security" is checked. - Windows: Make sure that you're using WSL 2 Ubuntu and NOT command prompt. @@ -109,7 +85,27 @@ Instructions: - Boot up the docker container using the "Alternate Shortcut" above. - Run `xeyes` while INSIDE the Docker container to test X11 forwarding. If this works, we're good. ---- + +## Launching Code +### Open Docker +- Use `cd` to change the working directory to be `RoboBuggy2` +- Then do `./setup_dev.sh` in the main directory (RoboBuggy2) to launch the docker container. Utilize the `--no-gpu`, `--force-gpu`, and `--run-testing` flags as necessary. +- Then you can go in the docker container using the `docker exec -it robobuggy2-main-1 bash`. +- When you are done, type Ctrl+C and use `$exit` to exit. + +### 2D Simulation +- Boot up the docker container +- Run `roslaunch buggy sim_2d_single.launch` to simulate 1 buggy +- See `rb_ws/src/buggy/launch/sim_2d_single.launch` to view all available launch options +- Run `roslaunch buggy sim_2d_2buggies.launch` to simulate 2 buggies + +Screenshot 2023-11-13 at 3 18 30 PM + +- See `rb_ws/src/buggy/launch/sim_2d_2buggies.launch` to view all available launch options + - The buggy starting positions can be changed using the `sc_start_pos` and `nand_start_pos` arguments (can pass as a key to a dictionary of preset start positions in engine.py, a single float for starting distance along planned trajectory, or 3 comma-separated floats (utm east, utm north, and heading)) +- To prevent topic name collision, a topic named `t` associated with buggy named `x` have format `x/t`. The names are `SC` and `Nand` in the 2 buggy simulator. In the one buggy simulator, the name can be defined as a launch arg. +- See [**Foxglove Visualization**](#foxglove-visualization) for visualizing the simulation. Beware that since topic names are user-defined, you will need to adjust the topic names in each panel. + ### Connecting to and Launching the RoboBuggy When launching the buggy: - Connect to the Wi-Fi named ShortCircuit. @@ -132,3 +128,13 @@ When shutting down the buggy: `$ exit` - Shutdown the ShortCircuit computer `$ sudo shutdown now` + +## Documentation +### Simulator notes +- Longitude + Latitude for Foxglove visualization on map: `/state/pose_navsat` (sensor_msgs/NavSatFix) +- UTM coordinates (assume we're in Zone 17T): `/sim_2d/utm` (geometry_msgs/Pose - position.x = Easting meters , position.y = Northing meters, position.z = heading in degrees from East axis + is CCW) +- INS Simulation: `/nav/odom` (nsg_msgs/Odometry) (**Noise** is implemented to vary ~1cm) +Commands: +- Steering angle: `/buggy/steering` in degrees (std_msgs/Float64) +- Velocity: `/buggy/velocity` in m/s (std_msgs/Float64) + From 96d0366487771504824c0eb6a5773384de83d422 Mon Sep 17 00:00:00 2001 From: TiaSinghania Date: Tue, 1 Oct 2024 15:53:30 -0400 Subject: [PATCH 2/3] removed todos --- README.md | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 6f78dc3c..c431aa35 100755 --- a/README.md +++ b/README.md @@ -5,13 +5,13 @@ A complete re-write of the old RoboBuggy. This code was run for RD23, RD24 and R ## Table of Contents - Installation and Initial Setup - Launching Code + - Infrastructure Documentation - Code Structure and Documentation --- ## Installation and Initial Setup ### Necessary + Recommended Software -TODO: add explanations for what each software is for - Docker - Foxglove - VSCode (recommended) @@ -29,12 +29,10 @@ TODO: add explanations for what each software is for ### Git - -## TODO: other docs which i don't know if they're necessary ### Install Softwares: WSL, Ubuntu - Go to Microsoft Store to install "Ubuntu 20.04.6 LTS". TODO: is this actually necessary? -### Set up repo in WSL TODO: again, do we actually need wsl? +### Set up repo in WSL - To set up ssh key, follow this link: [Connecting to GitHub with SSH](https://docs.github.com/en/authentication/connecting-to-github-with-ssh). - Note: Ensure that the SSH keys are generated while in the WSL terminal - In the website above, see these two pages: [Generating a new SSH key and adding it to the ssh-agent](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) and ["Adding a new SSH key to your GitHub account"](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account). @@ -46,23 +44,10 @@ TODO: add explanations for what each software is for - In the website above, see these two pages: [Generating a new SSH key and adding it to the ssh-agent](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) and ["Adding a new SSH key to your GitHub account"](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account). -## Initial Setup - ### Clone the Repository This is so you can edit our codebase locally, and sync your changes with the rest of the team through Git. - In your terminal type: `$ git clone https://github.com/CMU-Robotics-Club/RoboBuggy2.git`. -- The clone link above is find in github: code -> local -> Clone SSH. -- ![image](https://github.com/CMU-Robotics-Club/RoboBuggy2/assets/116482510/8ea809f7-35f9-4517-b98d-42e2e869d233) - - -### ROS -TODO: what is this actually doing? explain what these lines of code do -- Navigate to `/rb_ws`. This is the catkin workspace where we will be doing all our ROS stuff. -- To build the ROS workspace and source it, run: - - catkin_make - source /rb_ws/devel/setup.bash # sets variables so that our package is visible to ROS commands -- To learn ROS on your own, follow the guide on https://wiki.ros.org/ROS/Tutorials. TODO: add recommendations on which aspects of ROS we use most +- The clone link above is the URL or can be found above: code -> local -> Clone HTTPS. ### Foxglove Visualization @@ -93,6 +78,13 @@ TODO: explain what X11 is for (i think it's only for the manual velocity updater - Then you can go in the docker container using the `docker exec -it robobuggy2-main-1 bash`. - When you are done, type Ctrl+C and use `$exit` to exit. +### ROS +- Navigate to `/rb_ws`. This is the catkin workspace where we will be doing all our ROS stuff. +- (This should only need to be run the first time you set up the repository) - to build the ROS workspace and source it, run: + catkin_make + source /rb_ws/devel/setup.bash # sets variables so that our package is visible to ROS commands +- To learn ROS on your own, follow the guide on https://wiki.ros.org/ROS/Tutorials. TODO: add recommendations on which aspects of ROS we use most + ### 2D Simulation - Boot up the docker container - Run `roslaunch buggy sim_2d_single.launch` to simulate 1 buggy @@ -106,8 +98,8 @@ TODO: explain what X11 is for (i think it's only for the manual velocity updater - To prevent topic name collision, a topic named `t` associated with buggy named `x` have format `x/t`. The names are `SC` and `Nand` in the 2 buggy simulator. In the one buggy simulator, the name can be defined as a launch arg. - See [**Foxglove Visualization**](#foxglove-visualization) for visualizing the simulation. Beware that since topic names are user-defined, you will need to adjust the topic names in each panel. -### Connecting to and Launching the RoboBuggy -When launching the buggy: +### Connecting to and Launching the RoboBuggies +When launching Short Circuit: - Connect to the Wi-Fi named ShortCircuit. - In the command line window: SSH to the computer on ShortCircuit and go to folder @@ -118,9 +110,12 @@ Then `$ cd RoboBuggy2` - Go to docker container `$ docker_exec` - Open foxglove and do local connection to “ws://192.168.1.217/8765” -- Roslauch in docker container by `$ roslaunch buggy sc-main.launch` (or `$ roslaunch buggy nand-main.launch` for NAND) +- Roslauch in docker container by `$ roslaunch buggy sc-main.launch` (wait until no longer prints “waiting for covariance to be better”) +When launching NAND: +- WORK IN PROGRESS + When shutting down the buggy: - Stop roslauch `$ ^C (Ctrl+C)` @@ -130,11 +125,16 @@ When shutting down the buggy: `$ sudo shutdown now` ## Documentation +### Infrastructure Documentation +WORK IN PROGRESS + ### Simulator notes - Longitude + Latitude for Foxglove visualization on map: `/state/pose_navsat` (sensor_msgs/NavSatFix) -- UTM coordinates (assume we're in Zone 17T): `/sim_2d/utm` (geometry_msgs/Pose - position.x = Easting meters , position.y = Northing meters, position.z = heading in degrees from East axis + is CCW) +- UTM coordinates (assume we're in Zone 17N): `/sim_2d/utm` (geometry_msgs/Pose - position.x = Easting meters , position.y = Northing meters, position.z = heading in degrees from East axis + is CCW) - INS Simulation: `/nav/odom` (nsg_msgs/Odometry) (**Noise** is implemented to vary ~1cm) Commands: - Steering angle: `/buggy/steering` in degrees (std_msgs/Float64) - Velocity: `/buggy/velocity` in m/s (std_msgs/Float64) +### Auton Logic +WORK IN PROGRESS From 070a8bc1d75bc53796e6a1ef3fbcf0d1373feb19 Mon Sep 17 00:00:00 2001 From: TiaSinghania Date: Tue, 1 Oct 2024 16:07:04 -0400 Subject: [PATCH 3/3] removed todos --- README.md | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 8d4306be..d92d1421 100755 --- a/README.md +++ b/README.md @@ -30,8 +30,8 @@ A complete re-write of the old RoboBuggy. This code was run for RD23, RD24 and R ### Git - https://git-scm.com/downloads -### Install Softwares: WSL, Ubuntu -- Go to Microsoft Store to install "Ubuntu 20.04.6 LTS". TODO: is this actually necessary? +### Install Softwares: WSL, Ubuntu (Windows only) +- Go to Microsoft Store to install "Ubuntu 20.04.6 LTS". ### Set up repo in WSL - To set up ssh key, follow this link: [Connecting to GitHub with SSH](https://docs.github.com/en/authentication/connecting-to-github-with-ssh). @@ -39,13 +39,8 @@ A complete re-write of the old RoboBuggy. This code was run for RD23, RD24 and R - In the website above, see these two pages: [Generating a new SSH key and adding it to the ssh-agent](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) and ["Adding a new SSH key to your GitHub account"](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account). -## Installation (for MacOS) -### Install Softwares: Docker, Foxglove -- Go install Foxglove https://foxglove.dev/. -- You will need [Docker](https://docs.docker.com/get-docker/) installed. - ### Apple Silicon Mac Only: -- In Docker Desktop App: go to settings -> general and turn on "Use Rosetta for x86/amd64 emulation on Apple Silicon" +- In Docker Desktop App: go to settings -> general and turn on "Use Rosetta for x86/amd64 emulation on Apple Silicon" ### Set up repository - To set up ssh key, follow this link: [Connecting to GitHub with SSH](https://docs.github.com/en/authentication/connecting-to-github-with-ssh). @@ -72,7 +67,6 @@ This is so you can edit our codebase locally, and sync your changes with the res ### X11 Setup (recommended) -TODO: explain what X11 is for (i think it's only for the manual velocity updater in the sim?) - Install the appropriate X11 server on your computer for your respective operating systems (Xming for Windows, XQuartz for Mac, etc.). - Mac: In XQuartz settings, ensure that the "Allow connections from network clients" under "Security" is checked. - Windows: Make sure that you're using WSL 2 Ubuntu and NOT command prompt. @@ -93,7 +87,7 @@ TODO: explain what X11 is for (i think it's only for the manual velocity updater - (This should only need to be run the first time you set up the repository) - to build the ROS workspace and source it, run: catkin_make source /rb_ws/devel/setup.bash # sets variables so that our package is visible to ROS commands -- To learn ROS on your own, follow the guide on https://wiki.ros.org/ROS/Tutorials. TODO: add recommendations on which aspects of ROS we use most +- To learn ROS on your own, follow the guide on https://wiki.ros.org/ROS/Tutorials. ### 2D Simulation - Boot up the docker container