Skip to content

Commit

Permalink
Styling
Browse files Browse the repository at this point in the history
  • Loading branch information
krichardsson committed Aug 29, 2023
1 parent ec94e43 commit 3e680f3
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions examples/mocap/mocap_hl_commander.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@
Set the uri to the radio settings of the Crazyflie and modify the
mocap setting matching your system.
"""
import motioncapture
import time
from threading import Thread

import motioncapture

import cflib.crtp
from cflib.crazyflie import Crazyflie
from cflib.crazyflie.log import LogConfig
Expand All @@ -45,11 +46,11 @@
uri = uri_helper.uri_from_env(default='radio://0/80/2M/E7E7E7E7E7')

# The host name or ip address of the mocap system
host_name = "192.168.5.21"
host_name = '192.168.5.21'

# The type of the mocap system
# Valid options are: "vicon", "optitrack", "optitrack_closed_source", "qualisys", "nokov", "vrpn", "motionanalysis"
mocap_system_type = "qualisys"
# Valid options are: 'vicon', 'optitrack', 'optitrack_closed_source', 'qualisys', 'nokov', 'vrpn', 'motionanalysis'
mocap_system_type = 'qualisys'

# The name of the rigid body that represents the Crazyflie
rigid_body_name = 'cf'
Expand Down Expand Up @@ -94,7 +95,7 @@ def close(self):
self._stay_open = False

def run(self):
mc = motioncapture.connect(mocap_system_type, {"hostname": host_name})
mc = motioncapture.connect(mocap_system_type, {'hostname': host_name})
while self._stay_open:
mc.waitForNextFrame()
for name, obj in mc.rigidBodies.items():
Expand Down

0 comments on commit 3e680f3

Please sign in to comment.