Skip to content

Commit

Permalink
Merge pull request #254 from clearpathrobotics/0-13-development
Browse files Browse the repository at this point in the history
0 13 development
  • Loading branch information
dobrienCP authored Jun 18, 2024
2 parents b0b2fa7 + b8e9e66 commit abb09a2
Show file tree
Hide file tree
Showing 131 changed files with 16,017 additions and 3,487 deletions.
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -376,27 +376,33 @@ Links to headings must not include an extra slash between the name of the page a
<img src="/static/img/readme_images/readme_solidworks_image_4.png" width="800"/>

## Mermaid Diagrams

Mermaid is a JavaScript based diagram generator that uses Markdown for descriptions and is available to docusaurus through a [plug-in](https://docusaurus.io/docs/next/markdown-features/diagrams).

To get started with Mermaid diagrams, use their [live tool](https://mermaid.live/edit). The live viewing tool is useful to explore the various diagrams using their readily available templates.
>> Currently, we are on version 2.4.3 of the Mermaid plug-in. Therefore, not all of the templates in the live version are available.

> > Currently, we are on version 2.4.3 of the Mermaid plug-in. Therefore, not all of the templates in the live version are available.
Although Mermaid is more complicated to use than other tools, it is easy to version and outputs HTML objects; the resulting diagrams can include links and the text within it is searchable. Additionally, HTML tags can be included within the diagrams for further customization. Refer to the [Mermaid Documentation](https://mermaid.js.org/intro/getting-started.html) for more details on the diagram descriptions.

### Themes

In the [Docusaurus configuration file](./docusaurus.config.js), we have defined the site-wide themes for the Mermaid diagrams. Mermaid offers a choice of five different themes to choose from. There is a way to call the `mermaidAPI` to set a customized site-wide theme, however, this has not yet been implemented.

See their [theming documentation](https://mermaid.js.org/config/theming.html) for more information.

### Creating a Diagram

In Docusaurus, we can use a [dyanmic Mermaid component](https://docusaurus.io/docs/next/markdown-features/diagrams#component) to define and load diagrams.

First, we import the dynamic component.

```
import Mermaid from '@theme/Mermaid';
```

Then, we instantiate the component with the graph passed in as an argument.

```
<Mermaid
value={`
Expand All @@ -410,9 +416,11 @@ Then, we instantiate the component with the graph passed in as an argument.
```

### Configuring the Diagram

Diagrams can be modified indepent from the site-wide theme and configuration using [directives](https://mermaid.js.org/config/directives.html). Essentially, these directives are used to pass in an initialization configuration to the local diagram that overrides the existing global configuration.

For example, we can modify the way the arrow connecting two nodes is generated. Instead of the default, we can set the `curve` parameter to `step` to have the generated arrow move in steps rather than a smooth curve.

```
<Mermaid
value={`
Expand All @@ -434,10 +442,10 @@ For example, we can modify the way the arrow connecting two nodes is generated.

Notice that when defining a directive within the dynamic component, we must end every line with a backslash `\`. Make sure to not have any trailing commas, `,`, at the end of a list or dictionary.

See the [flowchart configuration](
https://mermaid.js.org/config/schema-docs/config-defs-flowchart-diagram-config.html) to see all the settings specific to flowcharts that can be modified with directives.
See the [flowchart configuration](https://mermaid.js.org/config/schema-docs/config-defs-flowchart-diagram-config.html) to see all the settings specific to flowcharts that can be modified with directives.

You may notice that there is no way to set the font size through the diagram's configuration. Instead that must be done by modifying the theme variables.

```
<Mermaid
value={`
Expand All @@ -459,10 +467,11 @@ You may notice that there is no way to set the font size through the diagram's c
`}
/>
```
See the (Mermaid configuration)[https://mermaid.js.org/config/schema-docs/config.html] documentation page for an exhaustive list of parameters.

See the (Mermaid configuration)[https://mermaid.js.org/config/schema-docs/config.html] documentation page for an exhaustive list of parameters.

Even though the font size has been modified, the rendered diagram's font may not appear to change size. Instead, the text size will remain a relatively similar size while the boxes and arrows appear smaller. Therefore, the sure-fire method to set a font size is to use HTML `<font size=10></font>` tags to wrap the text within a node.

```
<Mermaid
value={`
Expand Down
133 changes: 115 additions & 18 deletions docs_outdoornav_user_manual/api/api_endpoints/autonomy_api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ The OutdoorNav software publishes to the topics in this section either
all the time or while an autonomous navigation missions is running. They
can be used to monitor the behaviour of OutdoorNav.


#### /assisted_teleop/cmd_vel

&emsp;&emsp;**Message Type:** geometry_msgs/Twist
Expand Down Expand Up @@ -88,14 +87,14 @@ including autonomy state and mode.

&emsp;&emsp;**Message Type:** [clearpath_dock_msgs/DockProperties](definitions.mdx#msg-dock-properties)

&emsp;&emsp;**Description:** A list of docks, in which each dock includes information related to
&emsp;&emsp;**Description:** A list of docks, in which each dock includes information related to
the location, id, etc...

#### /dock/state

&emsp;&emsp;**Message Type:** [clearpath_dock_msgs/DockState](definitions.mdx#msg-dock-state)

&emsp;&emsp;**Description:** The current state of the docking process.
&emsp;&emsp;**Description:** The current state of the docking process.

#### /localization/odom

Expand Down Expand Up @@ -169,7 +168,7 @@ the robot along the reference path.
&emsp;&emsp;**Message Type:** [clearpath_navigation_msgs/Metrics](definitions.mdx#msg-metrics)

&emsp;&emsp;**Description:** This topic provides metric information regarding the lifetime of
the navigation. This includes the total distance travelled, duration run, as well as mission
the navigation. This includes the total distance travelled, duration run, as well as mission
information such as how many missions have been sent, how many have been completed and the number
of replanning maneuvers, recoveries and number of tasks executed.

Expand Down Expand Up @@ -238,6 +237,81 @@ between the robot and the reference path) and as well as the heading
error (ie. the difference between the current heading and the path
direction).

#### /onav_log/delete_record

&emsp;&emsp;**Message Type:** [clearpath_logger_msgs/DeleteLog](definitions.mdx#srv-log-deletelog)

&emsp;&emsp;**Description:** Deletes a log as specified by the UUID provided. If the purge flag is set the log will be removed from
the internal records entirely. If not, then the record will be marked as deleted and the meta data preserved, though the log data will still
be deleted.

#### /onav_log/download_kmz

&emsp;&emsp;**Message Type:** [clearpath_logger_msgs/DownloadLog](definitions.mdx#srv-log-downloadlog)

&emsp;&emsp;**Description:** Converts the record with the given UUID into a KMZ file.

#### /onav_log/download_zip

&emsp;&emsp;**Message Type:** [clearpath_logger_msgs/DownloadLog](definitions.mdx#srv-log-downloadlog)

&emsp;&emsp;**Description:** Zips the raw contents of the record.

#### /onav_log/get_all_logs

&emsp;&emsp;**Message Type:** [clearpath_logger_msgs/GetAllLogs](definitions.mdx#srv-log-getalllogs)

&emsp;&emsp;**Description:** Returns an array of all Event logs recorded in the database.

#### /onav_log/record_custom_event

&emsp;&emsp;**Message Type:** [clearpath_logger_msgs/RecordCustomEvent](definitions.mdx#srv-log-recordcustomevent)

&emsp;&emsp;**Description:** Adds a custom event to the currently recording log. Automatic telemetry, like power and location are added to the event if possible.

#### /onav_log/record_error_event

&emsp;&emsp;**Message Type:** [clearpath_logger_msgs/RecordErrorEvent](definitions.mdx#srv-log-recorderrorevent)

&emsp;&emsp;**Description:** Add an error/debugging event to the currently recording log.

#### /onav_log/record_event

&emsp;&emsp;**Message Type:** [clearpath_logger_msgs/RecordEvent](definitions.mdx#srv-log-recordevent)

&emsp;&emsp;**Description:** Add a fully formed event to the currently recording log.

#### /onav_log/record_location_event

&emsp;&emsp;**Message Type:** [clearpath_logger_msgs/RecordLocationEvent](definitions.mdx#srv-log-recordlocationevent)

&emsp;&emsp;**Description:** Adds a location event to the currently recording log. Automatic telemetry like power is added to the event if possible.

#### /onav_log/record_media_event

&emsp;&emsp;**Message Type:** [clearpath_logger_msgs/RecordMediaEvent](definitions.mdx#srv-log-recordmediaevent)

&emsp;&emsp;**Description:** Adds a media-recording event to the currently recording log. The media file is symlinked into the log directory.
Automatic telemetry like power is added to the event if possible.

#### /onav_log/record_power_event

&emsp;&emsp;**Message Type:** [clearpath_logger_msgs/RecordPowerEvent](definitions.mdx#srv-log-recordpowerevent)

&emsp;&emsp;**Description:** Add a power event to the currently recording log. Automatic telemetry like location is added to the event if possible.

#### /onav_log/start_recording

&emsp;&emsp;**Message Type:** [clearpath_logger_msgs/StartRecording](definitions.mdx#srv-log-startrecording)

&emsp;&emsp;**Description:** Start recording a new log.

#### /onav_log/stop_recording

&emsp;&emsp;**Message Type:** [clearpath_logger_msgs/StopRecording](definitions.mdx#srv-log-stoprecording)

&emsp;&emsp;**Description:** Stop recording the active log.

#### /safety/safety_stop

&emsp;&emsp;**Message Type:** [clearpath_safety_msgs/Safety](definitions.mdx#msg-safety)
Expand Down Expand Up @@ -273,7 +347,7 @@ message for 1 second).

&emsp;&emsp;**Description:** Result topic from the undock action.

------------------------------------------------------------------------
---

### Topics Subscribed to by Autonomy

Expand Down Expand Up @@ -330,7 +404,7 @@ initialized by a previously sent goal.
&emsp;&emsp;**Description:** This topic is used to send a goal to the undocking process.
The goal is empty since we always consider undocking to be a local undocking process.

------------------------------------------------------------------------
---

### Services Exported by Autonomy

Expand Down Expand Up @@ -386,7 +460,7 @@ the location of an existing dock (where the `uuid` field is required).

&emsp;&emsp;**Service Type:** [clearpath_dock_msgs/srv/SetDockLocationByName](definitions.mdx#srv-set-dock-location-by-name)

&emsp;&emsp;**Description:** Can be used to update the location of an existing dock. Requires the semantic name
&emsp;&emsp;**Description:** Can be used to update the location of an existing dock. Requires the semantic name
of the dock to be input into the `name` field.

#### /localization/set_datum
Expand Down Expand Up @@ -422,9 +496,9 @@ should be used with caution.
1. This feature does not take effect immediately when the service is
called, but only takes effect at the next Goal.

2. Disabling collision avoidance also disables the continuous planner, in such a case where the
continuous planner is enabled. When re-enabling the collision avoidance,
the continuous planner must also be re-enabled using the following API service.
2. Disabling collision avoidance also disables the continuous planner, in such a case where the
continuous planner is enabled. When re-enabling the collision avoidance,
the continuous planner must also be re-enabled using the following API service.

:::

Expand Down Expand Up @@ -495,42 +569,65 @@ True, delay compensation is ENABLED and the controller will compensate
for low-level mechanical delays. If False, delay compensation is
DISABLED and the normal behaviour is expected.

------------------------------------------------------------------------
---

### Actions Exported by Autonomy

#### /dock
#### /autonomy/dock/local

&emsp;&emsp;**Action Type:** [clearpath_dock_msgs/action/Dock](definitions.mdx#action-dock)
&emsp;&emsp;**Action Type:** [clearpath_dock_msgs/action/LocalDock](definitions.mdx#action-local-dock)

&emsp;&emsp;**Description:** Send the robot to the charging dock, if the docking
package has been included.
&emsp;&emsp;**Description:** Send the robot to the charging dock, if the UGV is facing and within range of a dock.

#### /autonomy/dock/network

&emsp;&emsp;**Action Type:** [clearpath_dock_msgs/action/NetworkDock](definitions.mdx#action-network-dock)

&emsp;&emsp;**Description:** Send the robot to the charging dock by navigating through an existing network map.

#### /autonomy/dock/radius

&emsp;&emsp;**Action Type:** [clearpath_dock_msgs/action/RadiusDock](definitions.mdx#action-radius-dock)

&emsp;&emsp;**Description:** Send the robot to the charging dock if the UGV is within a certain radius of the dock.

#### /autonomy/inspect_poi

&emsp;&emsp;**Action Type:** [clearpath_camera_msgs/action/InspectPOIAction](definitions.mdx#action-inspect-poi)

&emsp;&emsp;**Description:** Action call to move the PTZ camera to look at a POI.

#### /localization/survey

&emsp;&emsp;**Action Type:** [clearpath_localization_msgs/action/SurveyBaseStation](definitions.mdx#action-survey-base-station)

&emsp;&emsp;**Description:** Start surveying the base station, if available.

#### /mission
#### /autonomy/mission

&emsp;&emsp;**Action Type:** [clearpath_navigation_msgs/action/Mission](definitions.mdx#action-mission)

&emsp;&emsp;**Description:** Send goals for execution by the robot. This will
include the goal, the waypoint(s), tasks, goal tolerances, goal
heading, a from_start flag, and an optional start_waypoint_uuid.

#### /mission/by_id
#### /autonomy/mission/by_id

&emsp;&emsp;**Action Type:** [clearpath_navigation_msgs/action/ExecuteMissionByUuid](definitions.mdx#action-execute-mission-by-uuid)

&emsp;&emsp;**Description:** Send goals for execution by the robot
according to the specific mission uuid. This will include the goal, the waypoint(s), tasks,
goal tolerances, goal heading, an optional start_waypoint_uuid, and a from_start flag.

#### /autonomy/network_goto

&emsp;&emsp;**Action Type:** [clearpath_navigation_msgs/action/ExecuteNetworkGoTo](definitions.mdx#action-execute-network-goto)

&emsp;&emsp;**Description:** Send the UGV to a location within the network.

#### /undock

&emsp;&emsp;**Action Type:** [clearpath_dock_msgs/action/Dock](definitions.mdx#action-undock)

&emsp;&emsp;**Description:** Undock the robot to the charging dock, if the docking
package has been included.
package has been included.
Loading

0 comments on commit abb09a2

Please sign in to comment.