This ADMA ROS Driver is legacy, a new version of the Driver has been released at https://github.com/GeneSysElektronik/adma_ros_driver. There are many new features and a completly rework of the ROS2 driver.
- Tested with ROS-Melodic and Ubuntu 18 Ethernet:
- Uses Boost asio for UDP Socket handling CAN:
- Uses python-can and cantools library for receiving and decoding CAN bus messages. Tested on NVIDA Jetson AGX Xavier
In the following, it is described how to install the ROS environment from the ground up.
Note: If you already have a ROS installation, jump to "Installation of the ADMA ROS-Driver."
Note: For Ubuntu 18, choose ROS-Melodic:
For Ubuntu 20, choose ROS-Noetic:
-
Follow steps 1.1, 1.2 and 1.3
-
From step 1.4, on the Terminal enter:
sudo apt update
- From step 1.4, at least a "Desktop installation" is necessary. On the Terminal enter:
For ROS Melodic:
sudo apt install ros-melodic-desktop
For ROS Noetic:
sudo apt install ros-noetic-desktop
- Open the Terminal and enter:
gedit ~/.bashrc
This opens the text file to alter the source folder.
- Once the text file is open, go to the bottom and add the two following lines:
For Ubuntu 18:
source /opt/ros/melodic/setup.bash
echo "source /opt/ros/melodic/setup.bash"
For Ubuntu 20:
source /opt/ros/noetic/setup.bash
echo "source /opt/ros/noetic/setup.bash"
- To check if ROS is installed properly, on the terminal enter:
roscore
- If ROS is correclty installed, no error messages should appear.
- Open a terminal in a folder of choice. This folder will be the installation folder.
- Enter:
mkdir catkin_ws
<- This creates the directory "catkin_ws"
- Enter:
cd catkin_ws
<- enters the directory "catkin_ws"
- Enter:
mkdir src
<- creates the directory "src"
- Enter:
cd src
<- enters the directory "src"
- Enter:
git clone https://github.com/lab176344/adma_ros_driver.git
<- clones the source code to the local drive
- Enter:
cd ..
<- goes a folder upwards
- Enter:
catkin_make
- Enter:
source devel/setup.bash
The ADMA ROS-Driver has to be configured to receive data from the ADMA. This means that the IP and the port have to be updated in the code according to the current ADMA configuration.
- Go to the ADMA web interface, and note the Port and IP numbers:
- Open the folder where the ADMA ROS-driver was installed.
- Inside the installation folder, enter the folder \catkin_ws\src\adma_ros_driver\launch\
- Inside the folder, open the file: ADMA_pub_Ethernet.launch
- Update port and IP numbers according to the configuration in the ADMA web interface:
Note: the computer where the ADMA ROS-Driver is running should also be configured:
- The IP should be assigned
- The PC and its firewall (if present) should be able to receive data from the corresponding IP and Port.
- Enter the installation folder
- Enter the catkin_ws folder
- Open a terminal and enter:
source devel/setup.bash
- Enter:
roslaunch adma_connect ADMA_pub_Ethernet.launch
- Enter the installation folder
- Open a terminal and enter:
roslaunch ADMA_pub_CAN.launch
- You might have to change the parameters in the launch file accordingly to your setup.
- The ROS Messages from the ADMA are published in a custom message called adma under the topic "adma_data". There are two manners to test the data reception: a) by means of rostopic echo, and b) via rqt.
- Enter the installation folder
- Open a terminal and enter:
source devel/setup.bash
- Enter:
rostopic echo /adma_connect/adma_data
- If the information is being received, it should appear on the terminal
- Enter the installation folder
- Open a terminal and enter:
source devel/setup.bash
- Enter:
rqt_topic
- The list of topic will be displayed
- Select the "/adma_connect/adma_data" topic.
- If the information is being received, it should appear.
-
The original project can be found here: https://github.com/lab176344/adma_ros_driver
-
This project exists, thanks to these people: