(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Getting started with the K79 imaging radar

Description: Guide for setup and initial testing of K79 with ROS

Tutorial Level: BEGINNER

Next Tutorial: Configuring and updating firmware for K79

Connecting the radar

First, power on and connect the radar according to the following:

  1. Connect the power plug to the interface on the side of the radar, pushing until it clicks.

    K79_power_in.png

    1. To remove the power plug in the future, pull both the red tab and the plug itself (this requires a moderate amount of force).

      K79_power_out.png

  2. Connect the Ethernet plug to the back of the radar, aligning the red marking on plug and radar and pushing until it clicks.

    K79_ethernet_in.png

  3. Supply 12V DC power to the radar. The nominal current draw is roughly 0.3A when connected but not transmitting detections. During operation, the current can be as high as 1.0A depending on number of detection.

Setting up your computer to communicate with the radar

By default, the radar transmits data packets via UDP to IP address 10.0.0.75, however this (and other network parameters) can be reconfigured at a later step in this tutorial. The network interface for communicating with the radar can be set up either graphically with the Gnome network manager GUI or by modifying the system networking files; see below for both approaches.

Network configuration via Gnome GUI

This process varies slightly depending on the version of Ubuntu being used, but the settings remain the same. Choose to add a new wired interface in your network interface settings by navigating to Settings > Network and clicking the + icon next to Wired (Ubuntu 18.04) or by choosing Edit Connections... in the dropdown menu from the network icon in the upper toolbar and clicking the Add button.

Name the connection and choose the Ethernet device to be used from the dropdown list (this will vary between computers, on the TX2 it is eth0. Be careful to choose the correct interface if your machine has more than one Ethernet port):

K79_network_config1.png

Then, switch to the IPv4 Settings tab and set connection method to manual (static) with the following properties:

K79_network_config2.png

Click Save and close the network manager windows, then connect to the network by choosing it from the list of valid connections. You should now be able to open a terminal and ping 10.0.0.10 and see the following:

K79_ping.png

Network configuration via interfaces file

For an embedded application, you likely wish to configure different networking interfaces (eg CAN, Ethernet, WiFi) manually at boot via the /etc/network/interfaces file. To do this, edit the file and add the following, replacing eth0 with the name of your Ethernet interface:

auto eth0
iface eth0 inet static
address 10.0.0.75
netmask 255.255.255.0
gateway 0.0.0.0

After adding this to /etc/network/interfaces, either reboot the system or reload the interface with

sudo ifdown eth0 && sudo ip addr flush eth0 && sudo ifup eth0

Then confirm that ping 10.0.0.10 works as expected.

Running the ROS node

Once the radar responds to ping commands, you can attempt to run the K79 ROS node. This is most easily done via an accompanying launch file in ainstein_radar_drivers; see below:

K79_node_launch.png

Once the node is running, you should be able to see data streaming with rostopic echo as below:

K79_rostopic_echo.png

K79 coordinate frame

The coordinate frame of the K79 (and other Ainstein radars) is defined as follows:

  1. The sensor coordinate frame is x-forward, y-left and z-up, with positive azimuth angle measured around positive z-axis.
  2. Range is the distance in meters from the radar to the detection along the axis defined by the azimuth angle.
  3. Speed is measured in meters per second along the axis defined by the azimuth angle, with positive speed integrating to positive range (moving away from the sensor) and vice versa.

See the diagram below for clarification:

K79_coordinate_frame.png

By default, radar data is published in the "map" frame for simplicity, however the frame_id node parameter allows changing the data frame in ROS.

Viewing data in RViz

Once the ROS node is running (check rosnode list to be sure), you can open RViz and view the data using the RViz plugins for radar data (built/installed as part of the ainstein_radar package). To open RViz, in a new terminal run:

rosrun rviz rviz

Click the Add button at the bottom of the Displays panel (on the left by default). In the window that opens, select to add a display "By topic" as shown below:

K79_add_viz.png

You should now see a new display for the RadarTargetArray message type in the Displays panel on the left, and red markers indicating radar detections (targets) similar to below:

K79_rviz_data_small.png

Wiki: ainstein_radar/Tutorials/Getting started with the K79 imaging radar (last edited 2019-10-15 18:31:57 by nrotella-ainstein)