0

I am running code from this git which is designed to communicate with a radar and evaluation board from Texas Instruments using ROS1 noetic.

I am running the repository on a windows device inside a Docker container which is from the ROS:noetic image.

When I launch the ros node from the link, I get the following error:

root@docker-desktop:~/catkin_ws# roslaunch mmWave radar_rd_fft_viz.launch
WARNING: Package name "mmWave" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
... logging to /root/.ros/log/6dc0f760-4297-11ee-96bb-1e0fc3d54455/roslaunch-docker-desktop-2394.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://docker-desktop:36545/

SUMMARY
========

PARAMETERS
 * /rosdistro: noetic
 * /rosversion: 1.16.0

NODES
  /
    xwr1xxx (mmWave/no_Qt.py)
    xwr1xxx_rd_viz (mmWave/fft_viz.py)

ROS_MASTER_URI=http://localhost:11311

WARNING: Package name "mmWave" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
process[xwr1xxx-1]: started with pid [2415]
process[xwr1xxx_rd_viz-2]: started with pid [2416]
Traceback (most recent call last):
  File "/root/catkin_ws/src/mmWave/scripts/no_Qt.py", line 74, in <module>
    mmwave_sensor = mmWave_Sensor(iwr_cmd_tty=args.cmd_tty)
  File "/root/catkin_ws/src/mmWave/scripts/mmWave_class_noQt.py", line 60, in __init__
    self.data_socket.bind(("192.168.33.30", 4098))
OSError: [Errno 99] Cannot assign requested address
================================================================================REQUIRED process [xwr1xxx-1] has died!
process has died [pid 2415, exit code 1, cmd /root/catkin_ws/src/mmWave/scripts/no_Qt.py --cmd_tty /dev/tty/ACM0 14xx/indoor_human_rcs __name:=xwr1xxx __log:=/root/.ros/log/6dc0f760-4297-11ee-96bb-1e0fc3d54455/xwr1xxx-1.log].
log file: /root/.ros/log/6dc0f760-4297-11ee-96bb-1e0fc3d54455/xwr1xxx-1*.log
Initiating shutdown!
================================================================================
[xwr1xxx_rd_viz-2] killing on exit
[xwr1xxx-1] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done

As per instructions from the code I have made my PC ip address static and the one it is trying to bind too. The radar is connected by ethernet to the laptop and has a fixed IP address. I have tried pinging this IP address but it doesnt work, should this work?

The code that is causing the error can be seen below:

#!/usr/bin/env python
# license removed for brevity
import rospy
from std_msgs.msg import String
import os
import time
import sys
import socket
import serial
import pdb
import struct
import numpy as np
# import RadarRT_lib
from circular_buffer import ring_buffer
try: 
    import queue
except ImportError:
    import Queue as queue
from  ctypes import *
from radar_config import dict_to_list


class mmWave_Sensor():
    iwr_rec_cmd = ['sensorStop', 'sensorStart']
    # dca1000evm configuration commands; only the ones used are filled in
    # TODO: hardcoded comand values should be changed
    dca_cmd = { \
        'RESET_FPGA_CMD_CODE'               : b"", \
        'RESET_AR_DEV_CMD_CODE'             : b"", \
        'CONFIG_FPGA_GEN_CMD_CODE'          : b"\x5a\xa5\x03\x00\x06\x00\x01\x01\x01\x02\x03\x1e\xaa\xee", \
        'CONFIG_EEPROM_CMD_CODE'            : b"", \
        'RECORD_START_CMD_CODE'             : b"\x5a\xa5\x05\x00\x00\x00\xaa\xee", \
        'RECORD_STOP_CMD_CODE'              : b"\x5a\xa5\x06\x00\x00\x00\xaa\xee", \
        'PLAYBACK_START_CMD_CODE'           : b"", \
        'PLAYBACK_STOP_CMD_CODE'            : b"", \
        'SYSTEM_CONNECT_CMD_CODE'           : b"\x5a\xa5\x09\x00\x00\x00\xaa\xee", \
        'SYSTEM_ERROR_CMD_CODE'             : b"\x5a\xa5\x0a\x00\x01\x00\xaa\xee", \
        'CONFIG_PACKET_DATA_CMD_CODE'       : b"\x5a\xa5\x0b\x00\x06\x00\xc0\x05\xc4\x09\x00\x00\xaa\xee", \
        'CONFIG_DATA_MODE_AR_DEV_CMD_CODE'  : b"", \
        'INIT_FPGA_PLAYBACK_CMD_CODE'       : b"", \
        'READ_FPGA_VERSION_CMD_CODE'        : b"\x5a\xa5\x0e\x00\x00\x00\xaa\xee", \
    }

    dca_cmd_addr = ('192.168.33.180', 4096)
    dca_socket = None
    data_socket = None
    iwr_serial = None

    dca_socket_open = False
    data_socket_open = False
    serial_open = False

    capture_started = 0

    data_file = None

    def __init__(self, iwr_cmd_tty='/dev/ttyACM0', iwr_data_tty='/dev/ttyACM1'):

        self.data_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
        self.data_socket.bind(("192.168.33.30", 4098))
        self.data_socket.settimeout(25e-5)
        #self.data_socket.setblocking(True)
        self.data_socket_open = True

        self.seqn = 0  # this is the last packet index
        self.bytec = 0 # this is a byte counter
        self.q = Queue.Queue()
        frame_len = 2*rospy.get_param('iwr_cfg/profiles')[0]['adcSamples']*rospy.get_param('iwr_cfg/numLanes')*rospy.get_param('iwr_cfg/numChirps')
        self.data_array = ring_buffer(int(2*frame_len), int(frame_len))


        self.iwr_cmd_tty=iwr_cmd_tty
        self.iwr_data_tty=iwr_data_tty

Any help would be greatly appreciated!

Thankyou in advance

EDIT: added network config info:

From Windows device:

Windows IP Configuration


Ethernet adapter vEthernet (Default Switch):

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::9405:9c7c:b786:3535%41
   IPv4 Address. . . . . . . . . . . : 172.19.32.1
   Subnet Mask . . . . . . . . . . . : 255.255.240.0
   Default Gateway . . . . . . . . . :

Ethernet adapter Ethernet 4:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::5e5d:c3bb:233c:6616%2
   IPv4 Address. . . . . . . . . . . : 192.168.33.30
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . :

Wireless LAN adapter Local Area Connection* 9:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Wireless LAN adapter Local Area Connection* 10:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Wireless LAN adapter WiFi:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::b46c:2cb5:f160:cc85%20
   IPv4 Address. . . . . . . . . . . : 192.168.0.35
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.0.1

Ethernet adapter Bluetooth Network Connection:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Ethernet adapter vEthernet (WSL):

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::a408:7104:f925:9cbd%57
   IPv4 Address. . . . . . . . . . . : 172.28.48.1
   Subnet Mask . . . . . . . . . . . : 255.255.240.0
   Default Gateway . . . . . . . . . :

From docker container:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: tunl0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
    link/ipip 0.0.0.0 brd 0.0.0.0
3: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
    link/sit 0.0.0.0 brd 0.0.0.0
4: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 02:42:e6:46:35:37 brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
       valid_lft forever preferred_lft forever
7: eth0@if6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default 
    link/ether 1e:0f:c3:d5:44:55 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 192.168.65.4 peer 192.168.65.5/32 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::1c0f:c3ff:fed5:4455/64 scope link 
       valid_lft forever preferred_lft forever
brad
  • 11
  • 1

0 Answers0