1. Specify your ugvs information in a configuration file similar to config/ugvs.yaml:

  - id: 7
    pos_source: mocap # mocap, nluwb, cfuwb
    yaw_source: mocap # mocap, imu
    mocap_markerset_name: ugv7 # markerset name in vrpn
    initialPosition: [0.25, 0.55, 0.0, -1.8] # [x(m),y(m),z(m),yaw(rad)] # only for simulation

  - id: 10
    pos_source: nluwb # mocap, nluwb, cfuwb
    yaw_source: imu # mocap, imu
    uwb_tag_id: 10 # nooploop uwb tag id
    initialPosition: [0.0, 0.0, 0.0, 1.57] # [x(m),y(m),z(m),yaw(rad)]  # only for simulation

Specify mocap_markerset_name for mocap or uwb_tag_id for nluwb. The initialPosition is only for simulation.

  1. Write your python script. Import the UGVswarm class of this python package in your project. See the example of

# in your python script
from pyugvswarm import *

swarm = UGVswarm('your config file path') # absolute path is recommended
timeHelper = swarm.timeHelper
allugvs = swarm.allugvs

ugvs = allugvs.ugvs
ugv_0 = ugvs[0]
  1. Run the positioning & communication nodes and your script:

  • For simulation, you can run your python script with arg --sim. It does not rely on ROS.

  • For experiment, we support 3 types of positioning system: motion capture, nooploop UWB, and crazyflie UWB. The control commands and UGV states were tranferred by swarm_ros_bridge through WIFI network. You should modify config/ros_topics.yaml for the real communication situations.

# for matplot 3d display (slower simulation)
python ../ --sim --dt=0.1 --vis=mpl

# for none display (faster simulation)
python ../ --sim --dt=0.1 --vis=null

or use shell script:

cd launch/
./ # for simulation