erl_common_ros is the ROS wrapper of erl_common.
- Clock Synchronization: Programmable clock node for simulation and data replay
- Transform Broadcasting: Convert transform messages to TF broadcasts
- ROS Bridge Support: Tools for bridging between ROS1 and ROS2
- Bag File Conversion: Scripts for converting ROS1 bags to ROS2 format
- Cross-Platform: Compatible with both ROS1 and ROS2
cd <your_workspace>
mkdir -p src
vcs import --input https://raw.githubusercontent.com/ExistentialRobotics/erl_common_ros/refs/head/main/erl_common_ros.repos src- Ubuntu 20.04 for ROS1
- Ubuntu 22.04 or later for ROS2
- ROS1 Noetic or ROS2 Humble or later
- C++17 compatible compiler
- CMake 3.24 or higher
This package depends on the following ERL packages:
Standard ROS dependencies:
geometry_msgstf2_rosrosgraph_msgs
# Ubuntu 20.04
wget -qO - https://raw.githubusercontent.com/ExistentialRobotics/erl_common/refs/heads/main/scripts/setup_ubuntu_20.04.bash | bash
# Ubuntu 22.04, 24.04
wget -qO - https://raw.githubusercontent.com/ExistentialRobotics/erl_common/refs/heads/main/scripts/setup_ubuntu_22.04_24.04.bash | bashWe also provide docker files for easy setup.
cd <your_workspace>
# for ROS1
catkin build erl_common_ros
source devel/setup.bash
# for ROS2
colcon build --packages-up-to erl_common_ros
source install/setup.bashPublishes clock messages at a configurable rate for simulation time control.
Published Topics:
/clock(rosgraph_msgs/Clock): Clock messages for simulation time
Parameters:
clock_rate(double): Publishing frequency in Hz (default: 100.0)start_time(double): Starting time in seconds (default: current time)
Usage:
# ROS1
rosrun erl_common_ros clock_node _clock_rate:=50.0 _start_time:=0.0
# ROS2
ros2 run erl_common_ros clock_node --ros-args -p clock_rate:=50.0 -p start_time:=0.0Subscribes to transform messages and broadcasts them as TF transforms.
Subscribed Topics:
transform(geometry_msgs/TransformStamped): Transform messages to broadcast
Parameters:
transform_topic(string): Input transform topic name (default: "transform")
Usage:
# ROS1
rosrun erl_common_ros transform_to_tf_node _transform_topic:=/my_transform
# ROS2
ros2 run erl_common_ros transform_to_tf_node --ros-args -p transform_topic:=/my_transformThe package includes several utility scripts in the scripts/ directory:
Converts ROS1 bag files to ROS2 format using rosbags-convert.
Usage:
./scripts/convert_rosbag_1to2.bash input_bag.bag output_directory [topic1 topic2 ...]Launches the ROS1-ROS2 bridge for cross-version communication.
Usage:
./scripts/run_ros1_bridge.bashStarts a ROS1 core with appropriate environment setup.
Usage:
./scripts/run_ros1_core.bash