Niryo robot rpi

This package deals with Raspberry Pi related stuff (Button, fans, I/O, leds, …).

The package manages the following components:

  • Physical top button: executes actions when the button is pressed.

  • Digital I/O panel: gets commands and sends the current state of digital I/Os. Also controls tools like the Electromagnet.

  • Analog I/O panel: gets commands and sends the current state of analog I/Os.

  • End Effector I/O panel: gets commands and sends the current state of the digital I/Os of the end effector panel on Ned2. Also controls tools like the Electromagnet.

  • Robot fans.

  • Shutdown Manager: shutdown or reboot the Raspberry.

  • ROS log: can remove all previous logs on start_up to prevent a lack of disk space in the long run (SD cards do not have infinite storage).

It belongs to the ROS namespace: /niryo_robot_rpi.

Warning

This package should not be used when you are using Ned ROS stack on your computer in simulation mode.

Package Documentation

ROS topics

Publishers

Topic Name

Type

Description

/niryo_robot/blockly/save_current_point

std_msgs/Int32

Save current robot pose in blockly block when user is in Blockly page in Niyro Studio

/niryo_robot/rpi/is_button_pressed

std_msgs/Bool

Publish the button state (true if pressed)

/niryo_robot_rpi/analog_io_state

niryo_robot_rpi/AnalogIOState

Publish the analog I/O states, returning pin, name, mode & state

/niryo_robot_rpi/digital_io_state

niryo_robot_rpi/DigitalIOState

Publish the digital I/O states, returning pin, name, mode & state

/rosout

rosgraph_msgs/Log

N/A

Subscribers

Topic Name

Type

Description

/niryo_robot_hardware_interface/end_effector_interface/custom_button_status

end_effector_interface/EEButtonStatus

Publish Custom Button’s state

/niryo_robot_hardware_interface/end_effector_interface/free_drive_button_status

end_effector_interface/EEButtonStatus

Publish Free Motion Button’s state

/niryo_robot_hardware_interface/end_effector_interface/io_state

end_effector_interface/EEIOState

States of the IOs on the end effector panel

/niryo_robot_hardware_interface/end_effector_interface/save_pos_button_status

end_effector_interface/EEButtonStatus

Publish Save Button’s state

/niryo_robot_status/robot_status

niryo_robot_status/RobotStatus

Publish the robot, log, overheating and joints out of bounds status

ROS Services

Service Name

Type

Description

/niryo_robot_rpi/get_analog_io

niryo_robot_rpi/GetAnalogIO

Get given analog IO state

/niryo_robot_rpi/get_digital_io

niryo_robot_rpi/GetDigitalIO

Get given digital IO state

/niryo_robot_rpi/get_loggers

roscpp/GetLoggers

N/A

/niryo_robot_rpi/set_analog_io

niryo_robot_rpi/SetAnalogIO

Set an analog IO to the given value

/niryo_robot_rpi/set_digital_io

niryo_robot_rpi/SetDigitalIO

Set a digital IO to the given value

/niryo_robot_rpi/set_digital_io_mode

niryo_robot_rpi/SetIOMode

Set a digital IO to the given mode (OUPUT or INPUT)

/niryo_robot_rpi/set_logger_level

roscpp/SetLoggerLevel

N/A

/niryo_robot_rpi/shutdown_rpi

niryo_robot_msgs/AdvertiseShutdown

Shutdown the Raspberry Pi

ROS Parameters

Parameter Name

Default value

Simulation value

Unit

Description

/niryo_robot_rpi/adc/address

54

N/A

N/A

N/A

/niryo_robot_rpi/adc/i2c_bus

0

N/A

N/A

N/A

/niryo_robot_rpi/adc/v_ref

4.096

N/A

N/A

N/A

/niryo_robot_rpi/analog_inputs

[{‘name’: ‘AI1’, ‘pin’: 0, ‘dividing_bridge_factor’: 0.781181619}, {‘name’: ‘AI2’, ‘pin’: 1, ‘dividing_bridge_factor’: 0.781181619}]

N/A

N/A

N/A

/niryo_robot_rpi/analog_outputs

[{‘name’: ‘AO1’, ‘pin’: 0, ‘address’: 73, ‘i2c_bus’: 0, ‘v_ref’: 5.0, ‘resolution’: 12}, {‘name’: ‘AO2’, ‘pin’: 0, ‘address’: 75, ‘i2c_bus’: 0, ‘v_ref’: 5.0, ‘resolution’: 12}]

N/A

N/A

N/A

/niryo_robot_rpi/button/gpio

4

N/A

N/A

N/A

/niryo_robot_rpi/check_interrupt_flag_security_frequency

4

N/A

N/A

N/A

/niryo_robot_rpi/digital_inputs

[{‘name’: ‘DI1’, ‘pin’: 0, ‘reverse’: True}, {‘name’: ‘DI2’, ‘pin’: 1, ‘reverse’: True}, {‘name’: ‘DI3’, ‘pin’: 2, ‘reverse’: True}, {‘name’: ‘DI5’, ‘pin’: 3, ‘reverse’: True}]

N/A

N/A

N/A

/niryo_robot_rpi/digital_outputs

[{‘name’: ‘DO1’, ‘pin’: 12, ‘reverse’: False}, {‘name’: ‘DO2’, ‘pin’: 11, ‘reverse’: False}, {‘name’: ‘DO3’, ‘pin’: 10, ‘reverse’: False}]

N/A

N/A

N/A

/niryo_robot_rpi/end_effector_ios/digital_input

DI4

N/A

N/A

N/A

/niryo_robot_rpi/end_effector_ios/digital_output

DO4

N/A

N/A

N/A

/niryo_robot_rpi/fans

[{‘pin’: 8, ‘temperature_on_threshold’: 45, ‘temperature_off_threshold’: 40}, {‘pin’: 9, ‘temperature_on_threshold’: 55, ‘temperature_off_threshold’: 50}]

N/A

N/A

N/A

/niryo_robot_rpi/hardware_version

ned2

N/A

N/A

N/A

/niryo_robot_rpi/hotspot/button_pin

5

N/A

N/A

N/A

/niryo_robot_rpi/hotspot/led_pin

4

N/A

N/A

N/A

/niryo_robot_rpi/log_level

INFO

N/A

N/A

N/A

/niryo_robot_rpi/mcp/address

32

N/A

N/A

N/A

/niryo_robot_rpi/mcp/i2c_bus

0

N/A

N/A

N/A

/niryo_robot_rpi/mcp/interrupt_bcm

26

N/A

N/A

N/A

/niryo_robot_rpi/mcp/num_gpios

16

N/A

N/A

N/A

/niryo_robot_rpi/publish_io_state_frequency

10

N/A

N/A

N/A

/niryo_robot_rpi/shutdown_manager/digital_input

6

N/A

N/A

N/A

/niryo_robot_rpi/shutdown_manager/digital_output

7

N/A

N/A

N/A

/niryo_robot_rpi/shutdown_manager/pins_type

mcp

N/A

N/A

N/A

/niryo_robot_rpi/sound_card/i2c_address

26

N/A

N/A

N/A

/niryo_robot_rpi/sound_card/i2c_bus

1

N/A

N/A

N/A

ROS Action

Namespace: None