Connect to Devices coBridge
coBridge is an open-source edge software provided by coScene, currently supporting ros1 noetic
, ros2 foxy
and humble
versions. coBridge runs as a ros node on the robot side and interacts with the cloud through websocket connections. After establishing a connection with the cloud, coBridge can subscribe to ros topics and call ros services based on cloud commands, enabling real-time robot status monitoring, remote command deployment, and other functionalities.
Install coBridge
On the device side, open a terminal and follow these steps to install coBridge.
- Import the public key.
wget https://download.coscene.cn/cobridge/coscene.gpg && sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/coscene.gpg coscene.gpg
- Add the source.
echo "deb [signed-by=/etc/apt/trusted.gpg.d/coscene.gpg] https://download.coscene.cn/cobridge $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/cobridge.list
- Update apt and install.
sudo apt update
# Note: If ROS_DISTRO is not in your environment variables, ${ROS_DISTRO} should be replaced with 'noetic', 'foxy' or 'humble'
sudo apt install ros-${ROS_DISTRO}-cobridge -y
- Run coBridge.
source /opt/ros/${ROS_DISTRO}/setup.bash
# for ros 1 distribution
roslaunch cobridge cobridge.launch
# for ros 2 distribution
ros2 launch cobridge cobridge_launch.xml
Real-time Device Visualization Using coStudio
- Download coStudio.
- After launching coStudio, select the "Open Connection" feature.
- Choose the coScene Websocket option and enter the connection address in the WebSocket URL field.
ws://localhost:21274
(21274 is the default port for coBridge). - Once connected, you can use different panels for real-time device data visualization.
Visualization Reference Links
- Panel Settings: Panel Settings
- Layout Settings: Layout