In the office we have an old Yahboom ROS Robot which was parked in the lab closet. We thought it would be fun to see if we could use Viam and integrate it with ROS to
- collect data from the robot in real time
- store the data in the cloud
- integrated with both the Viam ML and SLAM services
- Build an internet enabled web app and mobile app
First, we need to install viam on the system where ROS is running.
If you have a transbot (or similar yahboom robot) running ROS Melodic and would like to see how viam works with ROS, you can install this module from the viam registry. If you have a Robot running ROS that is not a yahboom, we might need to add some custom messages as well as new topics.
see the BUILDING.md document for more instructions.
After getting the jetson flashed and built according to the Yahboom tutorial, we made a decision to use the goroslib open source library to integrate with the Viam GO SDK. ROS Melodic makes use of Python 3.6.9, the viam SDK requires Python 3.9 or greater.
To prove out our idea we wanted to implement the basic set of options:
- twist messages
- capture image data
- capture lidar data
- capture imu data
- capture sensor data from custom messages
The cmd/module/cmd.go file is the entry point into the program, this will start a rosnode using the goroslib module, we create one node per roscore primary address. Typically only one node will be created.
This node will support subscriptions and publishers to the various nodes.
We wanted to stay away from adding any ros packages (i.e. ros-bridge etc.) to ensure we don't cause any collision with software that was existing.
We welcome pull requests and issues, if there are any issues you can email:
[email protected] [email protected]
- The base converts Viam grpc calls to twist messages which are published to the
/cmd_vel
topic - The camera converts ROS Image messages to jpg format to be processed by Viam.
- The lidar converts ROS LaserScan messages to Viam pointcloud data.
- The imu converts ROS IMU Message to Viam movementsensor data.
- The battery sensor converts the Transbot Battery message to Viam sensor data
- The edition sensor converts the Transbot Edition message to Viam sensor data