Ianvs (Janus) is a ROS2 c++ package that provides a transition path for common ROS1 design patterns that aren't as easily supported in ROS2.
This includes:
- A
NodeHandle
class that works with any ROS2NodeBase
implementation and provides namespaced access to underlying node - Utility functions for handling getting single messages
- Specialized image publishers and subscribers that work with message filters
Ianvs is intended to only depend on a very select number of core ROS2 dependencies. These are currently:
message_filters
rclcpp
std_srvs
sensor_msgs
Ianvs includes a custom launch file extension for node
that allows the use of specific virtual environments
for a node besides the system environment (or the environment the node is built with). This works with --symlink-install
.
The underlying mechanism for this is to use the interpreter for the virtual environment for the node launch prefix, which is appended
to the launch prefix of the node if it's already specified, or becomes the launch prefix of the node otherwise.
You can manually replicate the same behavior if you so choose.
This method will not work (at the moment) for child processes (because the child process will use the python interpreter specified by PATH
which is not overridden).
You can enable this via:
launch:
# other launch file contents
- pyenv_node:
pkg: some_package
exec: some_python_node
name: some_node_name
pyenv: /path/to/python/environment
# whatever else you want
This will fail for non-python executables.
Ianvs includes an utility for playing a rosbag after modifying the static transforms. The general usage is below:
ros2 run ianvs /path/to/bag [-p prefix] [-s expr:sub]... [-f filter]... [-- ros2 bag play args]
The --
separator is optional in general, but necessary to deconflict with the --start-paused
or --storage
flags for the ros2 bag play
command.
Ianvs is the latin spelling of Janus, the Roman deity of doorways and transitions