fadecandy_driver package from fadecandy_ros repofadecandy_driver fadecandy_msgs |
|
Package Summary
Tags | No category tags. |
Version | 1.0.2 |
License | Apache License 2.0 |
Build type | AMENT_CMAKE |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/eurogroep/fadecandy_ros.git |
VCS Type | git |
VCS Version | ros2 |
Last Updated | 2023-10-02 |
Dev Status | MAINTAINED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Rein Appeldoorn
- Venkatavaradhan Vembanoor Lakshmi Narayanan
Authors
Fadecandy driver
ROS node for controlling LEDs via a fadecandy board. Uses python-usb to talk directly to the board, so it doesn’t need the fadecandy server - there are no dependencies on anything in the fadecandy repo. All you should need is a fadecandy board with fadecandy firmware on it.
Nodes
fadecandy_node
Parameters
-
~restart_patience
: Driver restart patience when no connection could be established (default=1.
)
Topics
Subscribers
-
set_leds
(fadecandy_msgs/LEDArray): Leds reference
Publishers
-
diagnostics
(diagnostic_msgs/DiagnosticStatus): Serial + connection status diagnostics
How to run
Start the node. Depending on permissions, this may need to run as root to talk to the USB device.
ros2 run fadecandy_driver fadecandy_node
To make sure everything is working, you can send a test pattern using the example client script.
ros2 run fadecandy_driver example_client
Note about how the LEDs are addressed
The fadecandy board has 8 pairs of outputs, numbered 0-7 on the PCB. Each of these can control a single Neopixel LED strip of up to 64 LEDs. In the LEDArray mesage, you can specify color outputs for an arbitrary number of strips. If the “strips” array in the LEDArray has length N, those colors are applied to the first N strips, starting with strip 0 on the board. So if you wanted to provide colors for just strip 0 and strip 5, you would need to include three empty LEDStrip messages in the “strips” message between them.
Within each LEDStrip message you provide a list of color values for each LED. If colors for less than 64 LEDs are provided, the rest are set to (0,0,0) (completely off). Also, the “a” (alpha) values of the colors aren’t used.
Finally, the fadecandy board doesn’t have any way of knowing how many strips are attached or how long they each are. It just pushes out 64 values for each of the 8 strips.
Configuring linux device permissions
By default, access the Fadecandy USB device in linux using libusb requires running as root. To
fix this, copy the rules file from the udev directory of this package into /etc/udev/rules.d
.
sudo cp udev/10-fadecandy.rules /etc/udev/rules.d/
Now reload the udev rules.
sudo udevadm control --reload-rules && udevadm trigger
If you have the Fadecandy device plugged in, unplug and replug it. Then make sure that your user has been added to the dialout group. Now you should be able to run without needing root!
Changelog for package fadecandy_driver
1.0.2 (2023-10-02)
- fix(drivers): missing build depend on pkg-config
- Contributors: Rein Appeldoorn
1.0.1 (2023-09-21)
1.0.0 (2023-09-05)
- remove time dependency
- refactor to ros2
- Contributors: Tom de Winter
0.2.2 (2021-05-17)
- fix: usb interface number (#24)
- Contributors: Jad Haj Mustafa
0.2.1 (2021-04-20)
- chore(package.xml): Update maintainers
- Contributors: Rein Appeldoorn
0.2.0 (2021-04-19)
- Feat/refactor to c++ (#20) Co-authored-by: jad <<jad.hajmustafa@eurogroep.com>> Co-authored-by: Rein Appeldoorn <<reinzor@gmail.com>>
- Merge pull request #17 from eurogroep/fix/handle-reconnections fix: Handle reconnections properly
- fix(diagnostics): Publish before first connect
- Merge pull request #15 from eurogroep/fix/remove-fadecandy-util-unused-file fix: remove unused fadecandy_util.py
- fix: Handle reconnections properly Release the USB device and restart the driver when an IOError has been raised while sending to the USB device. This way, we can recover from unplugging and pluggin the USB device.
- fix: remove unused fadecandy_util.py
- Contributors: Catherine Wong, Jad Haj Mustafa, Rein Appeldoorn
0.1.3 (2020-11-02)
- Merge pull request #13 from eurogroep/fix/noetic-python3-struct-pack: fix(Noetic/Python3): Struct packing
- Contributors: Rein Appeldoorn
0.1.2 (2020-07-06)
- Merge pull request #10 from eurogroep/chore/log-io-error chore: log IO error
- Merge pull request #9 from eurogroep/fix/rospy-shutdown fix(shutdown): Shutdown gracefully when no connection was set-up
- Contributors: Rein Appeldoorn
0.1.1 (2020-06-03)
- Merge pull request #7 from jonbinney/python3-fixes Fixes for python3/noetic compatibility
- Contributors: Jon Binney
0.1.0 (2020-05-28)
- Initial release.
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
ament_cmake | |
rclpy | |
diagnostic_updater | |
fadecandy_msgs | |
rclcpp |
System Dependencies
Name |
---|
pkg-config |
libusb-1.0-dev |