No version for distro humble. Known supported distros are highlighted in the buttons above.
No version for distro iron. Known supported distros are highlighted in the buttons above.
No version for distro rolling. Known supported distros are highlighted in the buttons above.
No version for distro noetic. Known supported distros are highlighted in the buttons above.
No version for distro ardent. Known supported distros are highlighted in the buttons above.
No version for distro bouncy. Known supported distros are highlighted in the buttons above.
No version for distro crystal. Known supported distros are highlighted in the buttons above.
No version for distro eloquent. Known supported distros are highlighted in the buttons above.
No version for distro dashing. Known supported distros are highlighted in the buttons above.
No version for distro galactic. Known supported distros are highlighted in the buttons above.
No version for distro foxy. Known supported distros are highlighted in the buttons above.
No version for distro lunar. Known supported distros are highlighted in the buttons above.
No version for distro jade. Known supported distros are highlighted in the buttons above.
No version for distro indigo. Known supported distros are highlighted in the buttons above.
No version for distro hydro. Known supported distros are highlighted in the buttons above.

gpio_control package from gpio_control repo

gpio_control

Package Summary

Tags No category tags.
Version 1.0.0
License Apache 2.0
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/cst0/gpio_control.git
VCS Type git
VCS Version master
Last Updated 2021-04-21
Dev Status MAINTAINED
CI status Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Control GPIO pins on Raspberry Pi, Nvidia Jetson, and other Linux devices with GPIO pins

Additional Links

Maintainers

  • cst

Authors

No additional authors.

gpio_control: a ROS package for reading/writing GPIO states on the Pi, Jetson, and many more

Overview

Devices such as the Raspberry Pi, NVidia Jetson, BeagleBone Black, etc have GPIO pins as an additional set of IO, which can be toggled between high/low states or configured to read high/low inputs. This package allows for ROS control of these pins, allowing for configuring each pin as desired and then reading/writing them as a ROS node. Additionally, an API which is consistent from device to device is provided, which aims to make porting robots from platfrom to platform much easier.

This package has been most thoroughly tested on ROS Melodic running on the NVidia Jetson Nano B01 and on ROS Kinetic running on the Raspberry Pi 3 B+, but has been designed with other platforms and ROS versions in mind. Please file an issue if this package does not behave as expected. Bug fixes and contributions, especially ones which support new devices, are welcomed.

The gpio_control_node node allows for control of the GPIO of generic Linux systems. This is done through the standard Linux /dev/sys/gpio filesystem, and therefore allows for support of all Linux devices with GPIO pins which conform to this standard. This can be specified using the --device generic flag.

Additionally, devices such as the Raspberry Pi, which have their own GPIO software API, are supported via this API in the same node. gpio_control_utils.py provides the backbone for this node, and can also be imported to provide standardized GPIO control across the variety of machines this package supports. See the section on 'gpio_control_utils' for more information.

NOTE: Writing GPIO control states via the filesystem may include writing to pins which are in use by the operating system, which can have unexpected consequences (loss of SD card data, crashes, etc). It is recommended that you use the device-specific flag, which will perform safety checks and prevent you from doing anything too damaging. There are device specific flags for the Raspberry Pi's (--device pi), Nvidia Jetson's (--device jetson), BeagleBone Black (--device beaglebone-experimental), and Onion Omega (--device onion-experimental).

The final device flag is in the form of --device simulated. This flag prevents any actual hardware manipulation, which makes it useful for running nodes in simulation.

Python dependencies should already be installed if you are using a device-specific API on its official operating system. If they are not installed properly, the node will notice and provide some next steps for you to take.

Usage

Each node accepts the same command line parameters. In the following command, gpio_control is used to create an input on pin 12 of the Raspberry Pi:

rosrun gpio_control gpio_control --device pi --input 12

Upon running this command, there should now be a topic titled /gpio_outputs/twelve which is publishing a gpio_control/InputState message.

Creating an output is similar:

rosrun gpio_control gpio_control --device pi --output 12

Upon running this command, there should now be a topic titled /gpio_outputs/twelve which will publish a gpio_control/OutputState upon a state change. The rate at which the node will check for a state change can be specified using --rate. Alternatively, the current state of a pin can be published continuously at the rate using --constant-publish.

It is possible to control multiple multiple pins with one node:

rosrun gpio_control gpio_control_node --device generic --output 12 13 14 --input 15 16 17

It is also possible to make a pin both an input and an output, depending on the device-specific implementation. This may be useful for error checking.

gpio_control_utils.py

The gpio_control_node operates by providing a command line interface to the gpio_control_utils python package, which will be importable in other projects upon installation. This provides a standard and stable interface for reading and writing to GPIO pins. See the node for example usage.

CHANGELOG

Changelog for package gpio_control

Forthcoming

  • first public release

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Package Dependencies

System Dependencies

No direct system dependencies.

Dependant Packages

No known dependants.

Launch files

No launch files found

Services

No service files found

Plugins

No plugins found.

Recent questions tagged gpio_control at Robotics Stack Exchange

gpio_control package from gpio_control repo

gpio_control

Package Summary

Tags No category tags.
Version 1.0.0
License Apache 2.0
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/cst0/gpio_control.git
VCS Type git
VCS Version master
Last Updated 2021-04-21
Dev Status MAINTAINED
CI status Continuous Integration : 0 / 0
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Control GPIO pins on Raspberry Pi, Nvidia Jetson, and other Linux devices with GPIO pins

Additional Links

Maintainers

  • cst

Authors

No additional authors.

gpio_control: a ROS package for reading/writing GPIO states on the Pi, Jetson, and many more

Overview

Devices such as the Raspberry Pi, NVidia Jetson, BeagleBone Black, etc have GPIO pins as an additional set of IO, which can be toggled between high/low states or configured to read high/low inputs. This package allows for ROS control of these pins, allowing for configuring each pin as desired and then reading/writing them as a ROS node. Additionally, an API which is consistent from device to device is provided, which aims to make porting robots from platfrom to platform much easier.

This package has been most thoroughly tested on ROS Melodic running on the NVidia Jetson Nano B01 and on ROS Kinetic running on the Raspberry Pi 3 B+, but has been designed with other platforms and ROS versions in mind. Please file an issue if this package does not behave as expected. Bug fixes and contributions, especially ones which support new devices, are welcomed.

The gpio_control_node node allows for control of the GPIO of generic Linux systems. This is done through the standard Linux /dev/sys/gpio filesystem, and therefore allows for support of all Linux devices with GPIO pins which conform to this standard. This can be specified using the --device generic flag.

Additionally, devices such as the Raspberry Pi, which have their own GPIO software API, are supported via this API in the same node. gpio_control_utils.py provides the backbone for this node, and can also be imported to provide standardized GPIO control across the variety of machines this package supports. See the section on 'gpio_control_utils' for more information.

NOTE: Writing GPIO control states via the filesystem may include writing to pins which are in use by the operating system, which can have unexpected consequences (loss of SD card data, crashes, etc). It is recommended that you use the device-specific flag, which will perform safety checks and prevent you from doing anything too damaging. There are device specific flags for the Raspberry Pi's (--device pi), Nvidia Jetson's (--device jetson), BeagleBone Black (--device beaglebone-experimental), and Onion Omega (--device onion-experimental).

The final device flag is in the form of --device simulated. This flag prevents any actual hardware manipulation, which makes it useful for running nodes in simulation.

Python dependencies should already be installed if you are using a device-specific API on its official operating system. If they are not installed properly, the node will notice and provide some next steps for you to take.

Usage

Each node accepts the same command line parameters. In the following command, gpio_control is used to create an input on pin 12 of the Raspberry Pi:

rosrun gpio_control gpio_control --device pi --input 12

Upon running this command, there should now be a topic titled /gpio_outputs/twelve which is publishing a gpio_control/InputState message.

Creating an output is similar:

rosrun gpio_control gpio_control --device pi --output 12

Upon running this command, there should now be a topic titled /gpio_outputs/twelve which will publish a gpio_control/OutputState upon a state change. The rate at which the node will check for a state change can be specified using --rate. Alternatively, the current state of a pin can be published continuously at the rate using --constant-publish.

It is possible to control multiple multiple pins with one node:

rosrun gpio_control gpio_control_node --device generic --output 12 13 14 --input 15 16 17

It is also possible to make a pin both an input and an output, depending on the device-specific implementation. This may be useful for error checking.

gpio_control_utils.py

The gpio_control_node operates by providing a command line interface to the gpio_control_utils python package, which will be importable in other projects upon installation. This provides a standard and stable interface for reading and writing to GPIO pins. See the node for example usage.

CHANGELOG

Changelog for package gpio_control

Forthcoming

  • first public release

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Package Dependencies

System Dependencies

No direct system dependencies.

Dependant Packages

No known dependants.

Launch files

No launch files found

Services

No service files found

Plugins

No plugins found.

Recent questions tagged gpio_control at Robotics Stack Exchange