You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add pre-commit hooks
* Fix unknown module issue from msgs
* Hardcode pylint version for consistency
* Add ros2-devel to workflow branches
* Remove pylint from workflow due to inconsistent errors between remote and local
* Add license
* Fix README numbering
* Fix LICENSE numbering
* Add license header to yaml files as well
[TODO: describe, in-detail, what issue this PR addresses and how it addresses it. Link to relevant Github Issues.]
3
+
\[TODO: describe, in-detail, what issue this PR addresses and how it addresses it. Link to relevant Github Issues.\]
4
4
5
5
# Testing procedure
6
6
7
-
[TODO: describe, in-detail, how you tested this. The procedure must be detailed enough for the reviewer(s) to recreate it.]
7
+
\[TODO: describe, in-detail, how you tested this. The procedure must be detailed enough for the reviewer(s) to recreate it.\]
8
8
9
9
# Before opening a pull request
10
-
-[ ] Format your code using [black formatter](https://black.readthedocs.io/en/stable/)`python3 -m black .`
11
-
-[ ] Run your code through [pylint](https://pylint.readthedocs.io/en/latest/) and address all warnings/errors. The only warnings that are acceptable to not address is TODOs that should be addressed in a future PR. From the top-level `ada_feeding` directory, run: `pylint --recursive=y --rcfile=.pylintrc .`.
10
+
11
+
-\[\]`pre-commit run --all-files`
12
+
-\[\] Run your code through [pylint](https://pylint.readthedocs.io/en/latest/). `pylint --recursive=y --rcfile=.pylintrc .`. All warnings but `fixme` must be addressed.
Copy file name to clipboardExpand all lines: README.md
+67-43Lines changed: 67 additions & 43 deletions
Original file line number
Diff line number
Diff line change
@@ -7,53 +7,71 @@ This README is the definitive source for downloading, installing, and running th
7
7
### Setup (Robot Software)
8
8
9
9
1.[Install ROS2 Humble](https://docs.ros.org/en/humble/Installation.html) (binary packages are recommended over building from source), [configure your environment](https://docs.ros.org/en/humble/Tutorials/Beginner-CLI-Tools/Configuring-ROS2-Environment.html), and [create a workspace](https://docs.ros.org/en/humble/Tutorials/Beginner-Client-Libraries/Creating-A-Workspace/Creating-A-Workspace.html#).
10
-
1.**NOTE**: In the remainder of the instructions, replace `~\colcon_ws` with the path to your workspace.
10
+
11
+
1.**NOTE**: In the remainder of the instructions, replace `~\colcon_ws` with the path to your workspace.
12
+
11
13
2. Configure [`pr-rosinstalls`](https://github.com/personalrobotics/pr-rosinstalls) in order to download all necessary repositories.
- Upgrade `transforms3d`, since [the release on Ubuntu packages is outdated](https://github.com/matthew-brett/transforms3d/issues/65): `python3 -m pip install transforms3d -U`
41
-
- Remove the duplicate matplotlib pip installation caused by installing scikit-spatial with pip (some accounts have required sudo access for this command, other have not. If you do not have sudo access and encounter this, contact a lab member who does):
42
-
43
-
```
44
-
python3 -m pip uninstall matplotlib
45
-
```
46
-
47
-
- [`pyrealsense2` is not released for ARM systems](https://github.com/IntelRealSense/librealsense/issues/6449#issuecomment-650784066), so ARM users will have to [build from source](https://github.com/IntelRealSense/librealsense/blob/master/wrappers/python/readme.md#building-from-source). You may have to add the `-DPYTHON_EXECUTABLE=/usr/bin/python3` flag to the `cmake` command. When running `sudo make install`, pay close attention to which path `pyrealsense2` is installed to and add *that path* to the `PYTHONPATH` -- it should be `/use/local/lib` but may be `/usr/local/OFF`.
48
-
47
+
```
48
+
cd ~/colcon_ws/src/ada_feeding
49
+
python3 -m pip install -r requirements.txt
50
+
```
51
+
52
+
- Upgrade `transforms3d`, since [the release on Ubuntu packages is outdated](https://github.com/matthew-brett/transforms3d/issues/65): `python3 -m pip install transforms3d -U`
53
+
54
+
- Remove the duplicate matplotlib pip installation caused by installing scikit-spatial with pip (some accounts have required sudo access for this command, other have not. If you do not have sudo access and encounter this, contact a lab member who does):
55
+
56
+
```
57
+
python3 -m pip uninstall matplotlib
58
+
```
59
+
60
+
- [`pyrealsense2` is not released for ARM systems](https://github.com/IntelRealSense/librealsense/issues/6449#issuecomment-650784066), so ARM users will have to [build from source](https://github.com/IntelRealSense/librealsense/blob/master/wrappers/python/readme.md#building-from-source). You may have to add the `-DPYTHON_EXECUTABLE=/usr/bin/python3` flag to the `cmake` command. When running `sudo make install`, pay close attention to which path `pyrealsense2` is installed to and add *that path* to the `PYTHONPATH` -- it should be `/use/local/lib` but may be `/usr/local/OFF`.
61
+
49
62
7. Install the JACO SDK (real robot only). All SDKs are listed [here](https://www.kinovarobotics.com/resources?r=79301&s); PRL currently uses the [Gen2 SDK v1.5.1](https://drive.google.com/file/d/1UEQAow0XLcVcPCeQfHK9ERBihOCclkJ9/view). Note that although the latest version of that SDK is for Ubuntu 16.04, it still works on Ubuntu 22.04 (only for x86 systems, not ARM system).
63
+
50
64
8. (Optional): We recommend using CycloneDDS as your ROS2 midleware, with a custom configuration file that enables multicast on loopback and prioritizes loopback. Install it with `sudo apt install ros-humble-rmw-cyclonedds-cpp`. Then, add the following lines to your `~/bashrc`: `export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp; export CYCLONEDDS_URI=~/colcon_ws/src/ada_feeding/cyclonedds.xml`.
51
-
- Note that you may have to change the name of the fallback interface that CycloneDDS uses if `lo` does not work for that transmission. To do so, run `ifconfig` and either use the name of your ethernet network or WiFi network, depending on how your computer is connected to the internet.
52
-
- Note that you have to [rebuild your workspace from scratch after doing this](https://docs.ros.org/en/humble/How-To-Guides/Working-with-multiple-RMW-implementations.html#adding-rmw-implementations-to-your-workspace).
65
+
66
+
- Note that you may have to change the name of the fallback interface that CycloneDDS uses if `lo` does not work for that transmission. To do so, run `ifconfig` and either use the name of your ethernet network or WiFi network, depending on how your computer is connected to the internet.
67
+
- Note that you have to [rebuild your workspace from scratch after doing this](https://docs.ros.org/en/humble/How-To-Guides/Working-with-multiple-RMW-implementations.html#adding-rmw-implementations-to-your-workspace).
68
+
53
69
9. Build your workspace:
54
70
55
-
cd ~/colcon_ws
56
-
colcon build --symlink-install # if sim-only, add '--packages-skip ada_hardware'
71
+
```
72
+
cd ~/colcon_ws
73
+
colcon build --symlink-install # if sim-only, add '--packages-skip ada_hardware'
74
+
```
57
75
58
76
### Setup (System Configuration)
59
77
@@ -68,31 +86,39 @@ If you change the e-stop button, the e-stop button's adapter(s), and/or the devi
68
86
### Setup (Web App)
69
87
70
88
1. Install the Node Version Manager (nvm): https://github.com/nvm-sh/nvm?tab=readme-ov-file#install--update-script
89
+
71
90
2. Install and use NodeJS 21 (Note: if you have just installed nvm using the previous command, you will need to source your .bashrc or open a new terminal to run these commands):
72
91
73
-
nvm install 21
74
-
nvm use 21
92
+
```
93
+
nvm install 21
94
+
nvm use 21
95
+
```
75
96
76
97
3. (Only for users **with** sudo access; this should already be configured on PRL computers) Make Node available to all users, including root:
4. (Only for users **with** sudo access; this should already be configured on PRL computers) Install `serve` and `pm2` globally. Root access is necessary for `serve` so it can access port 80.
83
106
84
-
sudo npm install -g serve
85
-
npm install -g pm2@latest
107
+
```
108
+
sudo npm install -g serve
109
+
npm install -g pm2@latest
110
+
```
86
111
87
112
5. Install the web app dependencies. (Note: there will be some vulnerabilities in dependencies. This is okay, since access to the web app is shielded behind our secure router.)
88
113
89
-
cd ~/colcon_ws/src/feeding_web_interface/feedingwebapp
90
-
npm install --legacy-peer-deps
91
-
npx playwright install
114
+
```
115
+
cd ~/colcon_ws/src/feeding_web_interface/feedingwebapp
116
+
npm install --legacy-peer-deps
117
+
npx playwright install
118
+
```
92
119
93
120
6. (Optional; this should already be configured on PRL computers) To access the web app on a device other than the one hosting it, enable the desired port for HTTP access: https://www.digitalocean.com/community/tutorials/ufw-essentials-common-firewall-rules-and-commands#allow-all-incoming-http-port-80
94
121
95
-
96
122
## Running the Software
97
123
98
124
We use the convenience script `start.py` to launch the software. This script has several command-line arguments, which can be seen by passing the `-h` flag when running the script.
@@ -112,7 +138,6 @@ In a browser, access `127.0.0.1` (if on the same device serving the web app), or
112
138
113
139
To close, run `python3 src/ada_feeding/start.py -c`
114
140
115
-
116
141
### Option B: Running Web App With the Mock Robot
117
142
118
143
This option starts the web app, runs dummy nodes for perception, runs the **real** robot motion code, but runs a mock robot in MoveIt. This is useful for testing robot motion code in simulation before moving onto the real robot. This will start the web app on port `3000` and does not require `sudo` access.
@@ -143,7 +168,6 @@ To close, run `python3 src/ada_feeding/start.py --sim dummy -c`
143
168
144
169
- **Something is not working, what do I do?**: All our code runs in `screen` sessions, so the first step is to attach to individual screen sessions to identify where the issue is. Run `screen -ls` to list all screens, run `screen -r <name>` to attach to a screen session, and `Ctrl-A d` to detach from the screen session. An introduction to `screen` can be found [here](https://astrobiomike.github.io/unix/screen-intro).
145
170
- **The watchdog is not recognizing my initial e-stop click**: Verify the e-stop is plugged in, and that any other processes accessing the microphone (e.g., Sound Settings) are closed. Run `alsamixer` to see if your user account has access to it. If you do not see sound levels in the terminal, try `sudo alsamixer`. If that works, give your user account permission to access sound: `sudo setfacl -m u:$USER:rw /dev/snd/*`
146
-
- **The watchdog is failing due to the F/T sensor**: First, check whether the force-torque sensor is publishing: `ros2 topic echo /wireless_ft/ftSensor3`. If not, the issue is in the `ft` screen (one potential issue is that the alias `ft-sensor` does not point to the right IP address for the force-torque sensor, in which case you should pass the IP address in using the `host` parameter). If so, check the timestamp of the published F/T messages compared to the current time. If it is off, the problem is that NTP got disabled on the force-torque sensor. You have to use `minicom` to re-enable NTP (see [here](https://github.com/personalrobotics/pr_docs/wiki/ADA) for PRL-specific instructions).
171
+
- **The watchdog is failing due to the F/T sensor**: First, check whether the force-torque sensor is publishing: `ros2 topic echo /wireless_ft/ftSensor3`. If not, the issue is in the `ft` screen (one potential issue is that the alias `ft-sensor` does not point to the right IP address for the force-torque sensor, in which case you should pass the IP address in using the `host` parameter). If so, check the timestamp of the published F/T messages compared to the current time. If it is off, the problem is that NTP got disabled on the force-torque sensor. You have to use `minicom` to re-enable NTP (see [here](https://github.com/personalrobotics/pr_docs/wiki/ADA) for PRL-specific instructions).
147
172
- **I get the error `cannot use destroyable because destruction was requested`**: Upgrade to the latest version of`rclpy`.
148
-
- **I get the error `rosbags is not installed, or a wrong version is installed (needs 0.9.19). Type Checking against rosbag types will not work. Error: No module named 'rosbags'`**: Upgrade or downgrade to `rosbags` version 0.9.19.
149
173
- **I get the error `bad option: --env-file=.env` when launching the WebRTC Signalling Server**: You are using an old version of Node; upgrade it to 21.
0 commit comments