Skip to content

Commit

Permalink
Merge pull request #27 from cwruRobotics/readme-template-update
Browse files Browse the repository at this point in the history
Readme template update
  • Loading branch information
InvincibleRMC authored Sep 25, 2023
2 parents e5d4b70 + 11aaabd commit 9895031
Show file tree
Hide file tree
Showing 36 changed files with 425 additions and 105 deletions.
16 changes: 2 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,13 @@ Then create a workspace:

If you're using VSCode, access WSL by opening VSCode, pressing `ctrl`+`` ` `` (below the `esc` key), clicking the dropdown arrow on the right and selecting `Ubuntu (WSL)`. You can also view your WSL files by opening `File Explorer > Linux (bottom left) > Ubuntu > home > your Ubuntu username`.

Run

<!-- ``` bash
mkdir -p rov_23_ws/src
```
```bash
cd rov_23_ws/
``` -->

```bash
git clone --recurse-submodules [email protected]:cwruRobotics/rov-24.git
```

<!-- (the src is important) -->

If you've never contributed to a git repository before, you might receive an error message saying you don't have access. In that case visit [this tutorial](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/about-ssh) to set up SSH for local GitHub access.

If you don't have `ros2_video_streamer` in the new `src` folder, run this:
If you don't have `ros2_video_streamer` in the `src` folder, run this:

```bash
git submodule update --init --recursive
Expand Down Expand Up @@ -73,7 +61,7 @@ Make sure you're updated (only on the first build or if something breaks)
rosdep update --rosdistro=$ROS_DISTRO
```

Install dependecies (only on the first build or if something breaks)
Install dependencies (only on the first build or if something breaks)

```bash
rosdep install --from-paths src --ignore-src -r -y
Expand Down
2 changes: 0 additions & 2 deletions doc/TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ https://github.com/leggedrobotics/ros_best_practices/blob/main/ros_package_templ

This is a template: replace, remove, and add where required. Describe here what this package does and what it's meant for in a few sentences.

* **Author: John Doe**

## Installation

Describe any dependencies not install by rosdep
Expand Down
35 changes: 35 additions & 0 deletions src/interfaces/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# interfaces

## Overview

This is the package for all our msg, srv, and action definitions.

## Msg files

[CameraControllerSwitch.msg](msg/CameraControllerSwitch.msg)

Used for toggling through camera feeds in the pilot gui.

[Manip.msg](msg/Manip.msg)

Used for toggling manipulators on and off.

[TaskFeedback.msg](msg/TaskFeedback.msg)

Used for communicating current task.

## Srv files

[TaskRequest.srv](srv/TaskRequest.srv)

Used for communicating current task and receiving response.

## Action files

[BasicTask.action](action/BasicTask.action)

BasicTask responds with a string.

[Example.action](action/Example.action)

An example action.
6 changes: 4 additions & 2 deletions src/interfaces/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>interfaces</name>
<version>0.0.0</version>
<version>1.0.0</version>
<description>MATE ROV Custom ROS Interfaces</description>
<maintainer email="[email protected]">Benjamin Poulin</maintainer>
<maintainer email="[email protected]">ericy</maintainer>
<maintainer email="[email protected]">Eric Yarnot</maintainer>
<maintainer email="[email protected]">Michael Carlstrom</maintainer>

<license>Apache License 2.0</license>

<buildtool_depend>ament_cmake</buildtool_depend>
Expand Down
23 changes: 16 additions & 7 deletions src/pi/camera_streamer/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
# Camera Streaming

## Pi & Pi Compute Module
# camera_streamer

IP: `192.168.2.2`
## Overview

Username: `rov`
Currently launches our regular cameras.

Password: `rov12345`

## Symlinks are auto-generated by V4L2
### Symlinks are auto-generated by V4L2

`ls /dev/v4l/by-id` for id based symlinks

`ls /dev/v4l/by-path` for usb slot based symlinks

## Usage

Run the main launch file with

```bash
ros2 launch camera_streamer camera_launch.py
```

## Launch files

* **camera_launch.py:** Launches 2 v4l2_camera_node to manage our cameras.
2 changes: 1 addition & 1 deletion src/pi/camera_streamer/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>camera_streamer</name>
<version>0.0.0</version>
<version>1.0.0</version>
<description>Capture video from usb and pi cameras and send it as MJPEG streams on ROS topics</description>
<maintainer email="[email protected]">Noah Mollerstuen</maintainer>
<license>Apches License 2.0</license>
Expand Down
9 changes: 5 additions & 4 deletions src/pi/camera_streamer/setup.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
from setuptools import setup
from glob import glob
import os
from glob import glob

from setuptools import setup

package_name = 'camera_streamer'

setup(
name=package_name,
version='0.0.0',
version='1.0.0',
packages=[package_name],
data_files=[
('share/ament_index/resource_index/packages',
Expand All @@ -20,7 +21,7 @@
zip_safe=True,
maintainer='Noah Mollerstuen',
maintainer_email='[email protected]',
description='contains camera information aswell as camera launch files',
description='contains camera information as well as camera launch files',
license='Apaches License 2.0',
tests_require=['pytest'],
entry_points={
Expand Down
53 changes: 53 additions & 0 deletions src/pi/manipulators/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# manipulators

## Overview

This package is used to toggle manipulators plugged into the I2C bus on the motherboard.

## Installation

These should be done for you but, in case something has gone wrong use these command and it should fix your installation.

```bash
git submodule add [email protected]:leloup314/TCA9555.git src/pi/manipulators/TCA9555
```

```bash
pip install wiringpi
```

## Usage

Run the main node with

```bash
ros2 run manipulators manipulator
```

Run the test node with

```bash
ros2 run manipulators test
```

## Launch files

* **manip_launch.py:** Launches the manipulators node.

## Nodes

### manipulator

On receiving a msg it toggles a manipulator on or off.

#### Subscribed Topics

* **`/manipulator_control`** ([msg/Manip])

The control msg for activating manipulators.

### test

Sends on and off signals to the IC2 board to confirm it is working. There is no ROS features being used.

[msg/Manip]:../../interfaces/msg/Manip.msg
3 changes: 2 additions & 1 deletion src/pi/manipulators/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>manipulators</name>
<version>0.0.0</version>
<version>1.0.0</version>
<description>Code for manipulators.</description>
<maintainer email="[email protected]">Georgia Martinez</maintainer>
<maintainer email="[email protected]">Michael Carlstrom</maintainer>
<license>Apache License, Version 2.0</license>

Expand Down
10 changes: 5 additions & 5 deletions src/pi/manipulators/setup.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import os
from glob import glob
from setuptools import setup
import sys
from glob import glob

from setuptools import setup

major_num = sys.version_info[0]
minor_num = sys.version_info[1]
Expand All @@ -11,7 +11,7 @@

setup(
name=package_name,
version='0.0.0',
version='1.0.0',
packages=[package_name],
data_files=[
('share/ament_index/resource_index/packages',
Expand All @@ -25,8 +25,8 @@
],
install_requires=['setuptools', 'bitstring', 'wiringpi'],
zip_safe=True,
maintainer='taz',
maintainer_email='[email protected]',
maintainer='Georgia Martinez, Michael Carlstrom',
maintainer_email='[email protected], [email protected]',
description='Code for manipulators',
license='Apache 2.0',
tests_require=['pytest'],
Expand Down
36 changes: 26 additions & 10 deletions src/pi/pi_main/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# Pi Main

[Tutorial followed](https://roboticsbackend.com/make-ros-launch-start-on-boot-with-robot_upstart/)
## Overview

This package launches the rest of the Pi packages. It should be run on Pi boot up.

Commands to be run to get launch file running on pi on boot.
[Tutorial followed](https://roboticsbackend.com/make-ros-launch-start-on-boot-with-robot_upstart/)

Should be in run src folder after a colcon build in the ws folder.
## Installation

Warning need to install python packages with sudo.
You need to run these commands to get the launch file running on Pi boot:

```bash
ros2 run pi_main install
Expand All @@ -16,32 +18,46 @@ ros2 run pi_main install
sudo systemctl daemon-reload
```

These commands should be run in the `src` folder after a colcon build in the workspace folder.

WARNING: Python packages must be installed with sudo for startup code to see them.

### Adding udev Rules

This should automatically be done by the prior command `ros2 run pi_main install`. If not copy all the .rules files from `udev_rules` in this package to the `/etc/udev/rules.d` directory to use USB devices properly.
This should automatically be done by the prior command `ros2 run pi_main install`. If not, copy all the .rules files from `udev_rules` in this package to the `/etc/udev/rules.d` directory to use USB devices properly.

### For Testing without Rebooting
## Usage

Runs in foreground for testing
[Tutorial followed](https://roboticsbackend.com/make-ros-launch-start-on-boot-with-robot_upstart/)

### Testing without Rebooting

Installing & setting up this package creates a startup task called `cwrubotix_pi`. You can manually start and stop this task.

You should run the `cwrubotix_pi` task in the foreground for testing (**make sure to kill the background task first - see below**):

```bash
sudo cwrubotix_pi-start
```

Runs in background
To run the `cwrubotix_pi` task in the background (happens on Pi startup):

```bash
sudo systemctl start cwrubotix_pi.service
```

Kills in background
To kill the `cwrubotix_pi` background task (**do this before starting the foreground task**):

```bash
sudo systemctl stop cwrubotix_pi.service
```

### Unistall cwrubotix_pi
To completely uninstall the `cwrubotix_pi` task:

```bash
ros2 run robot_upstart uninstall cwrubotix_pi
```

## Launch files

- **pi_launch.py**: launch the manipulators, camera streaming, and pixhawk packages
2 changes: 1 addition & 1 deletion src/pi/pi_main/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>pi_main</name>
<version>0.0.0</version>
<version>1.0.0</version>
<description>MATE ROV Pi Main</description>
<maintainer email="[email protected]">Benjamin Poulin</maintainer>
<license>Apache License 2.0</license>
Expand Down
6 changes: 3 additions & 3 deletions src/pi/pi_main/setup.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
from setuptools import setup
from glob import glob
import os
from glob import glob

from setuptools import setup

package_name = 'pi_main'


setup(
name=package_name,
version='0.0.3',
version='1.0.0',
packages=[package_name],
data_files=[
('share/ament_index/resource_index/packages',
Expand Down
2 changes: 0 additions & 2 deletions src/pi/pixhawk_communication/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ We communicate to the Pixhawk by using [mavros](https://github.com/mavlink/mavro

To set up a Pixhawk USB port use [this](https://docs.px4.io/main/en/companion_computer/pixhawk_companion.html) guide.

* **Author: Michael Carlstrom**

## Installation

Install geographiclib dependencies.
Expand Down
2 changes: 1 addition & 1 deletion src/pi/pixhawk_communication/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>pixhawk_communication</name>
<version>0.0.3</version>
<version>1.0.0</version>
<description>Manages Pixhawk</description>
<maintainer email="[email protected]">Michael Carlstrom</maintainer>
<license>Apache License 2.0</license>
Expand Down
7 changes: 4 additions & 3 deletions src/pi/pixhawk_communication/setup.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
from setuptools import setup
from glob import glob
import os
from glob import glob

from setuptools import setup

package_name = 'pixhawk_communication'

setup(
name=package_name,
version='0.0.3',
version='1.0.0',
packages=[package_name],
data_files=[
('share/ament_index/resource_index/packages',
Expand Down
Loading

0 comments on commit 9895031

Please sign in to comment.