Niryo robot database

This package is charge of managing the robot’s database. It is used to store and retrieve information about the robot’s settings, versions, …

It belongs to the ROS namespace: /niryo_robot_database.

Database API functions

Database ROS wrapper

In order to control the robot more easily than calling each topics & services one by one, a Python ROS Wrapper has been built on top of ROS.

For instance, a script getting the robot name from the database via Python ROS Wrapper will looks like:

from niryo_robot_database.api import DatabaseRosWrapper

database = DatabaseRosWrapper()
robot_version = database.get_setting('robot_name')

API list

class niryo_robot_database.api.database_ros_wrapper.DatabaseRosWrapper(service_timeout=1)

Bases: object

get_setting(name)

Retrieve a setting from the database

Example

database.get_setting('purge_ros_logs_on_startup')
Parameters:

name (str) – the name of the setting

Returns:

the value of the setting

Return type:

object

set_setting(name, value)

Set a setting in the database

Example

database.set_setting('purge_ros_logs_on_startup', True)
Parameters:
  • name (str) – the name of a setting

  • value (object) – the value of the setting

Returns:

status, message

Return type:

(int, str)

exception niryo_robot_database.api.database_ros_wrapper.DatabaseRosWrapperException

Bases: Exception

Package Documentation

ROS topics

Publishers

Topic Name

Type

Description

/niryo_robot_database/setting_update

niryo_robot_database/Setting

N/A

/rosout

rosgraph_msgs/Log

N/A

/niryo_robot_database/setting_update

niryo_robot_database/SettingMsg

Publish the new setting when it has been changed in the database

Subscribers

Topic Name

Type

Description

/niryo_robot_hardware_interface/software_version

niryo_robot_msgs/SoftwareVersion

Publish the firmware version of hardware devices the robot

ROS Services

Service Name

Type

Description

/niryo_robot_database/file_paths/add

niryo_robot_database/AddFilePath

N/A

/niryo_robot_database/file_paths/get_all_by_type

niryo_robot_database/GetAllByType

N/A

/niryo_robot_database/file_paths/rm

niryo_robot_database/RmFilePath

N/A

/niryo_robot_database/get_db_file_path

niryo_robot_msgs/GetString

N/A

/niryo_robot_database/get_loggers

roscpp/GetLoggers

N/A

/niryo_robot_database/set_logger_level

roscpp/SetLoggerLevel

N/A

/niryo_robot_database/settings/get

niryo_robot_database/GetSettings

N/A

/niryo_robot_database/settings/set

niryo_robot_database/SetSettings

N/A

/niryo_robot_database/get_db_file_path

niryo_robot_msgs/GetString

Get the path to hte database file

/niryo_robot_database/settings/set

niryo_robot_database/SetSettings

Set a setting form the database

/niryo_robot_database/settings/get

niryo_robot_database/GetSettings

Get a setting from the database

ROS Parameters

Parameter Name

Default value

Simulation value

Unit

Description

/niryo_robot_database/database_path

~/niryo_robot_saved_files/.config

N/A

N/A

N/A

/niryo_robot_database/hardware_version

ned

N/A

N/A

N/A

/niryo_robot_database/initialized

True

N/A

N/A

N/A

/niryo_robot_database/log_level

INFO

N/A

N/A

N/A

/niryo_robot_database/database_path

~/niryo_robot_saved_files/.config

N/A

string

Path to the database file

/niryo_robot_database/hardware_version

ned

N/A

string

Hardware version of the robot

/niryo_robot_database/initialized

false

N/A

bool

Whether the database node has been initialized or not

ROS Action

Namespace: None