In this time of revolution between the regimes of ROS 1 and ROS 2, Betsy ROS creates a unified banner
Translation: This package is a unified Python API for certain "meta" ROS API calls that work the same in ROS 1 and ROS 2.
sudo pip3 install betsy-ros
get_workspace_rootreturns aBuildTypeandpathlib.Pathindicating the type and location of the current workspace.BuildTypecan beCATKIN_MAKE,CATKIN_TOOLS, orCOLCON
get_ros_versionreturns anintandstrindicating the ROS version (1 or 2) and the distro short-name (e.g.lunar,bouncy)
get_package_name_from_pathreturns the name of the package that the initial path is in (including subfolders)get_package_namesreturns a set of strings of all the current package names, including the binary packages and the workspace packagesfind_packagereturns the path to a given packageis_binary_rosreturns True if the path passed to it is in the/opt/rosfolder
(i.e. messages, services and actions)
- The class
ROSInterfacehas three key attributes: - package
- type
- name
list_interfacesyieldsROSInterfaceinstances for all messages/services/actions in the environment.
(i.e. active topics, service providers and action servers)
get_topics,get_services, andget_actionsreturn the names of all active ROS resources- By default, it just returns the names.
- If
include_typesis set toTrue, the type will also be included as aROSInterface.
Package logo from artwork by Jean Leon Gerome Ferris (1863–1930): Betsy Ross 1777
