Giter Site home page Giter Site logo

pymmw's Introduction

Pythonic mmWave Toolbox for TI's IWR Radar Sensors

Introduction

This is a toolbox composed of Python scripts to interact with TI's evaluation module (BoosterPack) for IWRxx43 mmWave sensing devices. The toolbox provides easy access to particular OOB firmware versions, which are included in TI's mmWave SDKs and Industrial Toolboxes while focusing on data capturing and visualization with Python 3. Some elements of the toolbox can be considered being a Pythonic alternative to TI's mmWave Demo Visualizer.

pymmw

Support

  • IWR1443 ES2.0
    • Capture Demo (SDK 1.1.0.2)
    • mmWave SDK Demo (SDK 1.2.0.5)
    • High Accuracy 14xx (Industrial Toolbox 2.5.2)
    • 4K FFT Stitching (Industrial Toolbox 2.5.2)
  • IWR1443 ES3.0
    • mmWave SDK Demo (SDK 2.1.0.4)
    • High Accuracy 14xx (Industrial Toolbox 4.1.0)
  • IWR1843 ES1.0
    • mmWave SDK Demo (SDK 3.5.0.4)
  • IWR6843 ES2.0
    • mmWave SDK Demo (SDK 3.5.0.4)

Make sure to connect the carrier board (i.e. ICBOOST) of the antenna module used (e.g. IWR6843-ISKODS) via FTDI to enable resets without pressing NRST. Resets via XDS110 are supported for IWR-BOOST-EVMs devices only.

Advanced frame configuration with subframes is yet not supported.

Features

  • 2D plots
    • range and noise profile
    • Doppler-range FFT heat map
    • azimuth-range FFT heat map
    • FFT of IF signals
  • 3D plots
    • CFAR detected objects (point cloud)
    • simple CFAR clustering
  • Data capture
    • range and noise profile with CFAR detected objects

3D plots are currently not implemented for IWR1843 ES1.0 and IWR6843 ES2.0.

Usage

The launcher of the toolbox is pymmw.py:

usage: pymmw.py [-h] [-c PORT] [-d PORT] [-f HANDLER] [-n]

arguments:
  -h, --help                            show this message and exit
  -c PORT, --control-port PORT          set port for control communication
  -d PORT, --data-port PORT             set port for data communication
  -f HANDLER, --force-handler HANDLER   force handler for data processing
  -n, --no-discovery                    no discovery for USB devices

In GNU/Linux, the launcher attempts to find and select serial ports of a valid USB device if no serial ports are provided.

Internals

  1. The launcher
    • performs a connection test and resets the device (via the XDS110 debug probe).
    • observes the control port and tries to detect the firmware by its welcome message.
    • dynamically imports and initializes the handler (from /mss/*.py) for the firmware.
  2. The handler
    • reads its configuration file (from /mss/*.cfg) once at startup.
    • observes the data port and starts applications (from /app/*.py) defined in _meta_ with their required arguments.
    • captures data from the data port, possibly performs data preprocessing, and pipes the data to the application processes.
  3. Each application process
    • takes the data from stdin.
    • performs postprocessing, mostly for visualization or capturing purposes.
    • puts data, if implemented, to a file in /log.

Be patient when using Capture Demo for the "FFT of IF signals" application as the ADC data is first copied from ADC buffers to L3 memory and then published via UART. The update interval is about 10 seconds.

Configuration

The configuration files are pretty much like the original TI's profiles, except that they are JSON-formatted. Furthermore, all entries without a value (set to null) are attempted to be filled up with inferred values from the additional _settings_ block, which contains advanced settings for postprocessing (like range bias due to delays in the RF frontend) and a generic antenna configuration.

Make sure to have an appropriate configuration file with reasonable settings related to the firmware and handler, respectively, residing in /mss. Several configuration files with exemplary settings for different profiles and use cases are stored in /mss/cfg.

Dependencies

The toolbox works at least under GNU/Linux and Windows 10 with Python 3.8.5 - 3.8.9 if the following dependencies are met:

  • pyserial (3.4 - 3.5)
  • pyusb (1.0.2 - 1.1.1)
  • matplotlib (3.3.1 - 3.4.1)
  • numpy (1.19.1 - 1.20.2)
  • scipy (1.5.2 - 1.6.2) - is only required for the application "azimuth-range FFT heat map" of the mmWave SDK Demo
  • pyftdi (0.51.2 - 0.52.9) - is only required for carrier boards to reset via FTDI since reset via XDS110 is not reliable
  • tiflash (1.2.9) - is only required for the application "FFT of IF signals" of the Capture Demo in conjunction with Texas Instruments’s Code Composer Studio (8.3.0) scripting interface to read ADC data from the L3 memory
  • XDS Emulation Software Package (8.3.0) - is only required for working with Windows

To make the tiflash module and the "FFT of IF signals" application work properly, an environment variable named CCS_PATH should point to the Code Composer Studio directory.

Troubleshooting

Permission Issue

Insufficient permissions to access the device: probe usb_discover The device has no langid (permission issue, no string descriptors supported or device error). Add the required permissions for the XDS110 (and FTDI) device in udev, e.g. in /etc/udev/rules.d/99-mmwave.rules:

# XDS110 (xWR EVM)
SUBSYSTEM=="usb",ENV{DEVTYPE}=="usb_device",ATTRS{idVendor}=="0451",ATTRS{idProduct}=="bef3",MODE:="0666"

# FTDI (DCA, ICBoost)
SUBSYSTEM=="usb",ENV{DEVTYPE}=="usb_device",ATTRS{idVendor}=="0451",ATTRS{idProduct}=="fd03",MODE:="0666"

KERNEL=="ttyACM[0-9]*",MODE:="0666"

No Handler

No handler for a supported device and firmware could be found: pymmw _read_ no handler found. If pymmw.py is not able to read the welcome message of the firmware for some reason, try to set the USB ports manually and disable the USB discovery:

pymmw.py -c /dev/ttyACM0 -d /dev/ttyACM1 --no-discovery

Use the NRST button to reset the device if the no-discovery option is activated.

Reference

If you find this toolbox or code useful, please consider citing our paper:

@inproceedings{constapel2019practical,
  title={A Practical Toolbox for Getting Started with mmWave FMCW Radar Sensors},
  author={Constapel, Manfred and Cimdins, Marco and Hellbr{\"u}ck, Horst},
  booktitle={Proceedings of the 4th KuVS/GI Expert Talk on Localization},
  year={2019}
}

pymmw's People

Contributors

m6c7l avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pymmw's Issues

Waiting for reset (NRST) of the device

hello guys,

so I'm facing the issue while using the code, where it stops at "Waiting for reset (NRST) of the device". And I have tried both the FTDI_USB and XDS110 version, but none of them seem to work.
4
5

I'm currently using an MMWAVEICBOOST and the IWR6843ISK antenna.

If anyone could help that would be greatly appreciated.

Using the toolbox

Hi, i am new here

Wanted to ask you on how to use this toolbox because I tried to follow the steps and then write my own command that I got from demo visualizer in the console. However, I didn't get any feedback. Also, tried different configs

Running AWR1843, SDK 3.4 on Windows.

Thank you.

Can't get auto reset and force handler to work

Hi,
I'm trying to use this toolbox to read from my IWR6843ISK and IWR6843AOPEVM and i do have an MMWAVEICBOOST board available.
Everything works splendid as long as i press the reset button myself, but for further use I'd like to get the remote reset to work with either combination of my boards. I also assume that forcing a handler will achieve the same goal.

I tried using an unchanged copy of this repo under Win10 and Ubuntu 20.04.2 LTS from the command line inside a conda env, which i double checked on both systems to meet the requirements specified in the readme, and under both systems everything works great if i press the reset button.

In any case in no combination of my radars with and without the BOOST board attempt to reset when starting pymmw.py .
Also I'm not sure which argument to pass to -f, i tried different variations of x8_mmw but none seemed to work (handler not supported).

I tried looking through the code to find solutions to my problems, but nothing i tried produced the wanted result.
I would highly appreciate if you could point me to the right direction regarding reset via XDS or FTDI.

Thank you

Trouble getting the software to run with IWR6843AOP and Mmwaveicboost board

Hi, I have managed to successfully run the OOB mmWave demo Visualizer software (3.5) but I get the following upon pressing NRST on the Boost board.

mmwDemo:/>******************************************

xWR64xx MMW Demo 03.05.00.04


Note well : not xWR68xx ! Do not understand why this happening.

Running pymmw software locates the com ports automatically (ACM0 and ACM1) but just generates the message "pymmw read no handler found" . Tracing through the code I suspect the issue is with the initialization where it checks for the appropriate firmware and finds xWR64xx not xWR68xx.

Is there a way to force the correct loading of the handler or some other work around?

Thanks,
Mike

Plot limits incorrectly compared to detected points

In the update() function of plot_detected_objects.py, the following is done:

afbeelding

But while the plot limits are approximately +-5 meters, the received datapoints are extremely large. Take for example the data below:

'detected_points': {'0,0': {'v': 204213353, 'x': 212143469.0, 'y': 199166970.0, 'z': 203623367.0}}}

Because of this, none of the points is plotted. I assume we need to convert the x,y,z points to meters somehow. But how?

IWR1443 ES3.0 3D point cloud

Hi,

Thank you for the amazing software.

I'm using IWR1443 ES3.0 (with SDK 2.1) and trying to get 3D point cloud. I tried many of the TI official product but failed all of them (mmWave demo visualizer 2.1.0~3.0.0, roslaunch the 1443_3d rviz from other github but looks like only support ES2.0). It looks like they really don't update software/firmware for IWR1443 now. The only thing work is the mmWave studio 2.1.0 but it does not have a 3D point cloud.

It looks like your software is supporting IWR1443 ES3.0 (SDK 2.1) 3D point cloud plotting. I tried it in Windows but I failed just like #4 Now I plan to try in Ubuntu 20.04 and having the "No handler found" issue. But I believe this is fixable. I installed
pyserial (3.4)
pyusb (1.0.2)
matplotlib (3.3.1)
numpy (1.19.1)
since rest of the packages are not related to CFAR detected objects (point cloud).

To clarify, I should first run the pymmw.py with the correct ports(it will call 14_capture.py itself), then I run the application, which is plot_detected_objects.py. Is that the correct procedure?

Second problem: SDK2.1 you mean flash the xwr12xx_xwr14xx_masterss.bin and xwr12xx_xwr14xx_radarss.bin from mmwave_studio_02_01_01_00. Is that correct? Please correct me if I'm wrong.

Also, I suggest you guys post a video demo along with the source code. I believe it will help other users a lot. Thank you very much!!

Using the toolbox

Hi, i am new here

Wanted to ask you on how to use this toolbox because I tried to follow the steps and then write my own command that I got from demo visualizer in the console. However, I didn't get any feedback. Also, tried different configs

Running AWR1843, SDK 3.4 on Windows.

Thank you.

FFT of IF signals plots and handler

Hey,

I have another question regarding the plots.
In the README.md you say, that the 3D-plots are currently not available for IWR1843 ES1.0 and IWR6843 ES2.0.
I use the IWR6843 and therefore as expected do not have these plots.

BUT, I also do not get the FFT of IF signals plots, which I should get?

Do you have any idea what could be the reason of this issue?

Also, I don't quite understand what I need to enter for the handler?

Thank you.

Best regards

6843AOPEVM no plots showing

Hi,

Currently using an 6843AOPEVM with firmware version: 03.05.00.04

When i start the program the CFAR Detection plot is showing up. but i dont see any plots when people moving around.

When i close the CFAR Detection window it says:

Done
mmwDemo:/>(i) x8_mmw _pipe_ [Errno 22] Invalid argument plot_detected_objects

Need help with arguments

Hello,

I am using AWR6843ISK with DCA1000EVM, trying to capture raw adc data from the radar, I need help with one of the arguments. Can somebody help with an example of handler argument.

Thanks in advance

R

Can I avoid the use of NRESET and FTDI?

Thanks for the great tool.
I am using it with a IW6843AoP and the MMWAVEICBOOST.

Since I will want to have a stand alone setup, I am wondering how I can override the request for NRESET. Is it compulsory/necessary to always issue this command (via pressing the switch)?

Also, I am trying to make connection between the BP headers of the MMWAVEICBOOST and the UARTS on a raspberry pi. Seems to me that the setup works as it got to the stage of asking for the NRESET command, but since I can't issue this command via the headers. Any help to bypass this?

Further instructions for usage

Hi,
I am trying to use the Pythonic mmWave Toolbox you wrote and I am unsure of what the next steps are after getting to this stage
image
what exactly can I input into the "mmwaveDemo:/> "section.
I currently have the IWR6843AOP.
Thanks in advanced.

plot functions not running

When cloning the repository and making no changes except installing the correct packages, I get the following error:

image

All the plots render, but they are empty and do not measure anything.
Does anyone have any idea what could cause this?

getting broken pipe error while running with debian

i have iwr6843 while running this app with debian getting the following error.

mmwDemo:/>(w) x8_mmw pipe [Errno 32] Broken pipe plot_range_profile
(w) x8_mmw pipe [Errno 32] Broken pipe plot_range_azimuth_heat_map
(w) x8_mmw pipe [Errno 32] Broken pipe plot_range_doppler_heat_map

and with same board with ubuntu 20 is woking fine.

RangoDoppler Heatmap Not showing anything

Hello ,

so i was able to plot the range doppler heatmap and the azimuth heatmap also but both doesn't show anything although i get no error messages at all

I would appreciate some help thank you

ModuleNotFoundError: No module named 'serial'

Hey,

I tried to use your python code but I´m not able to get it to work. I use the Ti IWR6843 with the MMWAVEICBOOST carrier card. I programmed the chip with the xwr68xx_mmw_demo.bin form the mmwave_sdk_03_05_00_04.

When I try to start the programm I get the error: ModuleNotFoundError: No module named 'serial'

Can you help me to get it to work?

Range Profile Plot not showing

Hello,

First of all, I would like to thank you for making this useful GUI. I ran into an issue where the graphics didn't show anything when I ran the Python file. How can I solve this problem?

image

image

Problem With azimuth heatmap

Hello

I am having trouble with azimuth heatmap so the problem is eveything is working fine except that the plot doesnt show anything and i get this error message

Screenshot from 2022-05-20 11-50-07

you can see the error message on the right screen i have no idea why i am getting this so i would appreciate any help thank you

Best regards

stuck on "waiting for reset (NRST) of the device"

hi there,

I would like to understand what is the expected behaviour when calling pymmw.py?

I have given it the control port and data port arguments and it was able to print control port: /dev/ttyACM0 and data port: /dev/ttyACM1 so I think it was recognising the ports.

However the programme is now stuck on "waiting for reset (NRST) of the device". Am I supposed to hit the reset button on the sensor as that's what I did but nothing happened?

Thanks

Starting with IWR6843-ISK

Hello,
Thanks for your effort regarding Radar python code.

I'm just trying to start "pymmw" with IWR6843-ISK and "people counting example"

Configuration>

  1. Radar(TI IWR6843-ISK)
  2. Raspberrypi4

Try>
Radar is connected with Raspberrypi4 ,

and I would like to run the program in raspberrypi (RaspbianOS)

Here is my question.

  1. I download codes and run as below

python3 pymmw.py -c /dev/ttyUSB0 -d /dev/ttyUSB1
rpi1

I dont know why...
I waited for a long time, then I just push any button. Then I get the cli command.
So I manually put all my cli configuration. (Finally I can turn on RF frontend radar)

However, I dont know the next step for visualization.

I dont think that I am now fully understating about the program.

Could you give me any help please?

Thanks in advance .

IWR6843AOPEVM not detected

Hello, i'm trying to use your library but for some reason Windows cannot find the drivers for the IWR6843AOPEVM standalone (see image below).

afbeelding

I have already downloaded the XDS drivers but Windows refuses to detect them. Has anyone faced a similar issue?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.