Skip to content

Commit

Permalink
Merge pull request #207 from clearpathrobotics/rkreinin/lighting
Browse files Browse the repository at this point in the history
Added lighting section and lighting topics to API
  • Loading branch information
tonybaltovski authored Dec 20, 2023
2 parents 379a60f + 9469c91 commit 6ad9664
Show file tree
Hide file tree
Showing 15 changed files with 209 additions and 10 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
197 changes: 197 additions & 0 deletions docs_versioned_docs/version-ros2humble/ros/api/lighting.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,197 @@
---
title: Lighting
sidebar_label: Lighting
sidebar_position: 5
toc_min_heading_level: 2
toc_max_heading_level: 5
---

Corner lighting is unified for platforms that support it (D100, D150, R100, W200). Lighting is controlled by the [lighting node](https://github.com/clearpathrobotics/clearpath_common/tree/humble/clearpath_platform/src/lighting) which defines multiple lighting states.
The platforms lighting state is determined based on data from multiple platform status topics. Lighting states are given a priority, such that the most important state (lowest priority value) is displayed first.

The lighting node will publish the current lighting command directly to the MCU. It also subscribes to user lighting commands, and will instead publish those user commands if appropriate.


## Lighting States

<table>
<thead>
<tr>
<th>Lighting State</th>
<th>Lighting Pattern</th>
<th>Priority</th>
<th>User commands allowed</th>
<th>Platform</th>
</tr>
</thead>
<tbody>
<tr>
<td>Battery Fault</td>
<td>
<center>
<img
src={require("./img/battery_fault.gif").default}
width="100"
/>
</center>
</td>
<td>0</td>
<td>No</td>
<td>D100, D150, R100, W200</td>
</tr>
<tr>
<td>Shore power Fault</td>
<td>
<center>
<img
src={require("./img/shore_fault.gif").default}
width="100"
/>
</center>
</td>
<td>1</td>
<td>No</td>
<td>D100, D150</td>
</tr>
<tr>
<td>Shore Power and Charged</td>
<td>
<center>
<img
src={require("./img/shore_and_charged.gif").default}
width="100"
/>
</center>
</td>
<td>2</td>
<td>Yes</td>
<td>D100, D150</td>
</tr>
<tr>
<td>Shore Power and Charging</td>
<td>
<center>
<img
src={require("./img/shore_and_charging.gif").default}
width="100"
/>
</center>
</td>
<td>3</td>
<td>Yes</td>
<td>D150</td>
</tr>
<tr>
<td>Shore Power</td>
<td>
<center>
<img
src={require("./img/shore_power.png").default}
width="100"
/>
</center>
</td>
<td>4</td>
<td>Yes</td>
<td>D100, D150</td>
</tr>
<tr>
<td>Charged</td>
<td>
<center>
<img
src={require("./img/charged.png").default}
width="100"
/>
</center>
</td>
<td>5</td>
<td>Yes</td>
<td>D100, D150, R100, W200</td>
</tr>
<tr>
<td>Charging</td>
<td>
<center>
<img
src={require("./img/charging.gif").default}
width="100"
/>
</center>
</td>
<td>6</td>
<td>Yes</td>
<td>D150, R100</td>
</tr>
<tr>
<td>Stopped</td>
<td>
<center>
<img
src={require("./img/stopped.gif").default}
width="100"
/>
</center>
</td>
<td>7</td>
<td>No</td>
<td>D100, D150, R100, W200</td>
</tr>
<tr>
<td>Needs Reset</td>
<td>
<center>
<img
src={require("./img/needs_reset.gif").default}
width="100"
/>
</center>
</td>
<td>8</td>
<td>No</td>
<td>R100</td>
</tr>
<tr>
<td>Low Battery</td>
<td>
<center>
<img
src={require("./img/low_battery.gif").default}
width="100"
/>
</center>
</td>
<td>9</td>
<td>No</td>
<td>D100, D150, R100, W200</td>
</tr>
<tr>
<td>Driving</td>
<td>
<center>
<img
src={require("./img/driving.png").default}
width="100"
/>
</center>
</td>
<td>10</td>
<td>Yes</td>
<td>D100, D150, R100, W200</td>
</tr>
<tr>
<td>Idle</td>
<td>
<center>
<img
src={require("./img/idle.png").default}
width="100"
/>
</center>
</td>
<td>11</td>
<td>Yes</td>
<td>D100, D150, R100, W200</td>
</tr>
</tbody>
</table>
21 changes: 11 additions & 10 deletions docs_versioned_docs/version-ros2humble/ros/api/mcu_api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@ toc_max_heading_level: 4

## MCU topics

| Topic | Message type | Publisher | Description | QoS |
| :------------------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------- | :-------------------------------------- | :---------------------------------------------- |
| platform/emergency_stop | [std_msgs/Bool](https://github.com/ros2/common_interfaces/blob/humble/std_msgs/msg/Bool.msg) | MCU node | State of platform emergency stop | [Sensor Data](overview.mdx#sensor-data) |
| platform/mcu/status | [clearpath_platform_msgs/Status](https://github.com/clearpathrobotics/clearpath_msgs/blob/main/clearpath_platform_msgs/msg/Status.msg) | MCU node | MCU status | [Sensor Data](overview.mdx#sensor-data) |
| platform/mcu/status/power | [clearpath_platform_msgs/Power](https://github.com/clearpathrobotics/clearpath_msgs/blob/main/clearpath_platform_msgs/msg/Power.msg) | MCU node | Robot Power status | [Sensor Data](overview.mdx#sensor-data) |
| platform/mcu/status/stop | [clearpath_platform_msgs/StopStatus](https://github.com/clearpathrobotics/clearpath_msgs/blob/main/clearpath_platform_msgs/msg/StopStatus.msg) | MCU node | Stop loop status | [Sensor Data](overview.mdx#sensor-data) |
| platform/motors/cmd_drive | [clearpath_platform_msgs/Drive](https://github.com/clearpathrobotics/clearpath_msgs/blob/main/clearpath_platform_msgs/msg/Drive.msg) | Control node | Command velocities to individual wheels | [Sensor Data](overview.mdx#sensor-data) |
| platform/motors/feedback | [clearpath_platform_msgs/DriveFeedback](https://github.com/clearpathrobotics/clearpath_msgs/blob/main/clearpath_platform_msgs/msg/DriveFeedback.msg) | MCU node | Feedback from motor drive unit | [Sensor Data](overview.mdx#sensor-data) |
| platform/wifi_connected | [std_msgs/Bool](https://github.com/ros2/common_interfaces/blob/humble/std_msgs/msg/Bool.msg) | Wireless Watcher node | Wi-Fi connected status | [Sensor Data](overview.mdx#sensor-data) |
| /rosout | [rcl_interfaces/Log](https://github.com/ros2/rcl_interfaces/blob/humble/rcl_interfaces/msg/Log.msg) | MCU node | System Logs | [Transient Local](overview.mdx#transient-local) |
| Topic | Message type | Publisher | Description | QoS |
| :------------------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------- | :----------------------------------------------------- | :---------------------------------------------- |
| platform/emergency_stop | [std_msgs/Bool](https://github.com/ros2/common_interfaces/blob/humble/std_msgs/msg/Bool.msg) | MCU node | State of platform emergency stop | [Sensor Data](overview.mdx#sensor-data) |
| platform/mcu/_cmd_lights | [clearpath_platform_msgs/Lights](https://github.com/clearpathrobotics/clearpath_msgs/blob/main/clearpath_platform_msgs/msg/Lights.msg) | Lighting command | Hidden topic used to send lighting commands to the MCU | [Sensor Data](overview.mdx#sensor-data) |
| platform/mcu/status | [clearpath_platform_msgs/Status](https://github.com/clearpathrobotics/clearpath_msgs/blob/main/clearpath_platform_msgs/msg/Status.msg) | MCU node | MCU status | [Sensor Data](overview.mdx#sensor-data) |
| platform/mcu/status/power | [clearpath_platform_msgs/Power](https://github.com/clearpathrobotics/clearpath_msgs/blob/main/clearpath_platform_msgs/msg/Power.msg) | MCU node | Robot Power status | [Sensor Data](overview.mdx#sensor-data) |
| platform/mcu/status/stop | [clearpath_platform_msgs/StopStatus](https://github.com/clearpathrobotics/clearpath_msgs/blob/main/clearpath_platform_msgs/msg/StopStatus.msg) | MCU node | Stop loop status | [Sensor Data](overview.mdx#sensor-data) |
| platform/motors/cmd_drive | [clearpath_platform_msgs/Drive](https://github.com/clearpathrobotics/clearpath_msgs/blob/main/clearpath_platform_msgs/msg/Drive.msg) | Control node | Command velocities to individual wheels | [Sensor Data](overview.mdx#sensor-data) |
| platform/motors/feedback | [clearpath_platform_msgs/DriveFeedback](https://github.com/clearpathrobotics/clearpath_msgs/blob/main/clearpath_platform_msgs/msg/DriveFeedback.msg) | MCU node | Feedback from motor drive unit | [Sensor Data](overview.mdx#sensor-data) |
| platform/wifi_connected | [std_msgs/Bool](https://github.com/ros2/common_interfaces/blob/humble/std_msgs/msg/Bool.msg) | Wireless Watcher node | Wi-Fi connected status | [Sensor Data](overview.mdx#sensor-data) |
| /rosout | [rcl_interfaces/Log](https://github.com/ros2/rcl_interfaces/blob/humble/rcl_interfaces/msg/Log.msg) | MCU node | System Logs | [Transient Local](overview.mdx#transient-local) |

## MCU services

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ toc_max_heading_level: 4
| diagnostics | [diagnostics_msgs/DiagnosticArray](https://github.com/ros2/common_interfaces/blob/humble/diagnostic_msgs/msg/DiagnosticArray.msg) | Various nodes | Diagnostic messages reported by various nodes | [System Default](overview.mdx#system-default) |
| joy_teleop/cmd_vel | [geometry_msgs/Twist](https://github.com/ros2/common_interfaces/blob/humble/geometry_msgs/msg/Twist.msg) | Joy node | Velocity commands from joystick inputs | [System Default](overview.mdx#system-default) |
| joy_teleop/joy | [sensor_msgs/Joy](https://github.com/ros2/common_interfaces/blob/humble/sensor_msgs/msg/Joy.msg) | Joy node | Joystick input states | [System Default](overview.mdx#system-default) |
| platform/cmd_lights | [clearpath_platform_msgs/Lights](https://github.com/clearpathrobotics/clearpath_msgs/blob/main/clearpath_platform_msgs/msg/Lights.msg) | User | User lighting command request | [System Default](overview.mdx#system-default) |
| platform/cmd_vel_unstamped | [geometry_msgs/Twist](https://github.com/ros2/common_interfaces/blob/humble/geometry_msgs/msg/Twist.msg) | Twist Mux node | Resulting velocity commands from twist mux | [System Default](overview.mdx#system-default) |
| platform/dynamic_joint_states | [control_msgs/DynamicJointState](https://github.com/ros-controls/control_msgs/blob/humble/control_msgs/msg/DynamicJointState.msg) | Control node | Platform dynamic joint state | [System Default](overview.mdx#system-default) |
| platform/emergency_stop | [std_msgs/Bool](https://github.com/ros2/common_interfaces/blob/humble/std_msgs/msg/Bool.msg) | MCU node | State of platform emergency stop | [Sensor Data](overview.mdx#sensor-data) |
Expand Down

0 comments on commit 6ad9664

Please sign in to comment.