forked from wibotic/wibotic-ros-can-connector
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Jakub Delicat <[email protected]>
- Loading branch information
Showing
11 changed files
with
84 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
name: Run unit tests | ||
|
||
on: | ||
push: | ||
workflow_dispatch: | ||
# TODO: ENABLE WHEN READY | ||
# pull_request: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,33 @@ | ||
# wibotic_ros | ||
|
||
The repository contains `wibotic_connector_can` and `wibotic_msgs` packages. It reads a CAN Bus thanks to the uavcan library and sends the measurements to ROS 2. | ||
The repository contains `wibotic_connector_can` and `wibotic_msgs` packages. It reads a CAN Bus thanks to the uavcan library and sends the measurements from [Wibotic Wireless Charger](https://husarion.com/manuals/panther/panther-wch/) to ROS 2. | ||
|
||
## ROS Nodes | ||
## Quick start | ||
|
||
### wibotic_connector_can | ||
### Add can interface | ||
|
||
It reads a CAN Bus thanks to the uavcan library and sends the measurements to ROS 2. | ||
```bash | ||
sudo slcand -o -s6 -t hw -S 3000000 /dev/ttyACM0 | ||
sudo ip link set up can0 type can bitrate 500000 | ||
``` | ||
|
||
#### Publishes | ||
### Create workspace | ||
|
||
- `wibotic_info` [*wibotic_msgs/WiboticInfo*]: Wibotic charger measurements. | ||
```bash | ||
mkdir ~/husarion_ws | ||
cd ~/husarion_ws | ||
git clone -b ros2 https://github.com/husarion/wibotic_ros.git src/wibotic_ros | ||
``` | ||
|
||
#### Parameters | ||
### Build | ||
|
||
- `~can_iface_name` [*string*, default: **can0**]: CAN BUS interface used for Wibotic receiver. | ||
- `uavcan_node_id_` [*int*, default: **20**]: Uavcan node ID. | ||
- `uavcan_node_name_` [*string*, default: **can0**]: Uavcan node name. | ||
- `update_time_s_` [*string*, default: **can0**]: The period of reading WiboticInfo on a CAN BUS. | ||
```bash | ||
sudo rosdep init | ||
rosdep update --rosdistro $ROS_DISTRO | ||
rosdep install --from-paths src -y -i | ||
|
||
## Add can interface | ||
source /opt/ros/$ROS_DISTRO/setup.bash | ||
colcon build --symlink-install --packages-up-to wibotic_connector_can --cmake-args -DCMAKE_BUILD_TYPE=Release | ||
|
||
```bash | ||
sudo slcand -o -s6 -t hw -S 3000000 /dev/ttyACM0 | ||
sudo ip link set up can0 type can bitrate 500000 | ||
source install/setup.bash | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# wibotic_connector_can | ||
|
||
It reads a CAN Bus thanks to the uavcan library and sends the measurements to ROS 2. | ||
|
||
## ROS Nodes | ||
|
||
### wibotic_connector_can | ||
|
||
It reads a CAN Bus thanks to the uavcan library and sends the measurements to ROS 2. | ||
|
||
#### Publishes | ||
|
||
- `wibotic_info` [*wibotic_msgs/WiboticInfo*]: Wibotic charger measurements. | ||
|
||
#### Parameters | ||
|
||
- `~can_iface_name` [*string*, default: **can0**]: CAN BUS interface used for Wibotic receiver. | ||
- `~uavcan_node_id_` [*int*, default: **20**]: Uavcan node ID. | ||
- `~uavcan_node_name_` [*string*, default: **can0**]: Uavcan node name. | ||
- `~update_time_s_` [*string*, default: **can0**]: The period of reading WiboticInfo on a CAN BUS. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,14 +3,14 @@ | |
<package format="3"> | ||
<name>wibotic_connector_can</name> | ||
<version>0.1.0</version> | ||
<description>Integration Panther with Wibotic charger</description> | ||
<description>Integration Husarion UGV with Wibotic charger</description> | ||
|
||
<maintainer email="[email protected]">Husarion</maintainer> | ||
<license>Apache License 2.0</license> | ||
|
||
<url type="website">https://husarion.com/</url> | ||
<url type="repository">https://github.com/husarion/panther_ros</url> | ||
<url type="bugtracker">https://github.com/husarion/panther_ros/issues</url> | ||
<url type="repository">https://github.com/husarion/wibotic_ros</url> | ||
<url type="bugtracker">https://github.com/husarion/wibotic_ros/issues</url> | ||
|
||
<author email="[email protected]">Jakub Delicat</author> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# | ||
# WiBotic periodic information. | ||
# | ||
|
||
# | ||
# Primary parameters. | ||
# Some fields can be set to NAN if their values are unknown. | ||
# | ||
float16 VMonBatt | ||
float16 IBattery | ||
float16 VRect | ||
float16 VMonCharger | ||
float16 TBoard | ||
float16 TargetIBatt | ||
float16 ICharger | ||
float16 ISingleCharger2 | ||
float16 ISingleCharger3 |