clydemcqueen / udp_forward

Forward UDP packets
9 stars 4 forks source link

Drones command timeout for flock2 launch_two.py #2

Closed imsuneaik closed 4 years ago

imsuneaik commented 4 years ago

Greetings, I am trying to test out the flock2, ros swarm controller for Tello Edu Drones. However I am getting command timeout error which I supposed there could be mistakes in my network configuration and udp packet forwarding.

image

As per the instructions, the 2x RaspPI and Host Computer w Linux running on Virtual Machine are connected on the same network through ethernet LAN.

Executable script to allow udpforward to run in system

sudo cp /home/pi/udp_forward/tello1.sh /etc/init.d
sudo update-rc.d tello1.sh defaults

Snippet of codes for tello1.sh and tello2.sh and launch_two.py obtained from your source and tweaked accordingly to my network.

case "$1" in
  start)
    echo "Starting tello1"
    /home/pi/udp_forward/udp_forward 0.0.0.0 12001 192.168.10.1 8889 & #drone ip 
    /home/pi/udp_forward/udp_forward 0.0.0.0 8890 192.168.0.100 13001 & #vm ip
    /home/pi/udp_forward/udp_forward 0.0.0.0 11111 192.168.0.100 14001 & #vm ip
    ;;
  stop)

case "$1" in
  start)
    echo "Starting tello2"
    /home/pi/udp_forward/udp_forward 0.0.0.0 12002 192.168.10.1 8889 & #drone ip 
    /home/pi/udp_forward/udp_forward 0.0.0.0 8890 192.168.0.100 13002 & #vm ip
    /home/pi/udp_forward/udp_forward 0.0.0.0 11111 192.168.0.100 14002 & #vm ip
    ;;
  stop)

launch_two.py


  dr1_params = [{
        'drone_ip': '192.168.0.100', 
        'command_port': 11001,
        'drone_port': 12001,
        'data_port': 13001,
        'video_port': 14001
    }]

    dr2_params = [{
        'drone_ip': '192.168.0.100',
        'command_port': 11002,
        'drone_port': 12002,
        'data_port': 13002,
        'video_port': 14002
    }]

Much help is appreciated. Once again thank you so much for your assistance. I apologise as I am new to Linux/ROS and also weak in networking.

imsuneaik commented 4 years ago

Worked as intended after troubleshooting on the network.