Skip to content

MB-Team-THI/adma-ros-driver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Please Note

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.

ADMA Format Version: 3.3.3 - GPS Receiver for ROS

  • 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

Installation of the ROS environment

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:

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

How to update the source folder?

  • 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.

Installation of the ADMA ROS-Driver.

How to build the ADMA ROS-Driver package?

  • 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

How to configure the AMDA ROS Driver?

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:

Screenshot from 2022-03-28 17-05-17 - Kopie

Screenshot from 2022-03-28 17-07-14 - Kopie

  • 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:

Screenshot from 2022-03-28 17-20-54 - Kopie

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.

How to use the launch files?

a) When connected via Ethernet:

  • 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

b) When connected via CAN:

  • 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.

Accessing the ADMA Messages

  • 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.

a) By means of rostopic echo:

  • 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

b) Via rqt:

  • 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.

Credits