Optitrack to Crazyflie Set up

Discussions about all things Bitcraze
Post Reply
curiousstudent
Beginner
Posts: 18
Joined: Sun Jan 05, 2020 6:52 pm

Optitrack to Crazyflie Set up

Post by curiousstudent »

Hello!

So, I am trying to set up an optitrack system to control a crazyflie.
I was reading some documentation on the subject. But the only I could find was this.
http://act.usc.edu/publications/Hoenig_ ... OS2017.pdf
and
https://crazyswarm.readthedocs.io/en/latest/index.html

Both explain how to use the system once the optitrack is connected but I do not seem to be able to find how do I set up the computer with the optitrack system to the computer with the crazyflie controller(since from what I can see optitrack can only run on windows and the crazyflie system controlled by ROS uses UBUNTU so how would I set everything up?)?


Any help would be greatly appreciated!
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Optitrack to Crazyflie Set up

Post by kimberly »

Hi!

So with optitrack, there should be a separate desktop computer that runs windows with the Motive software. This is indeed only for windows, so there not a way around it I'm afraid... (unless you try the Ubuntu Wine package to run it anyway, but pretty sure that that is not going to work)

So if you have a optitrack system already connected to a windows computer, there exist actually an optitrack natnet sdk (https://optitrack.com/downloads/developer-tools.html), if you are connected with the same network as the optitrack computer, you can actually receive the pose on your own computer. This should be integrated in crazyswarm already, but you can ask a question on their issue list of the crazyswarm repo.

Have you checked out this issue already? https://github.com/USC-ACTLab/libmotioncapture/pull/3
curiousstudent
Beginner
Posts: 18
Joined: Sun Jan 05, 2020 6:52 pm

Re: Optitrack to Crazyflie Set up

Post by curiousstudent »

Thank you for your reply!

When you say on the same network what does that mean exactly in this situation?
Is just an Ethernet connection between the two enough?

Also if the Ethernet connection is enough can it be from the Ubuntu computer through the switch used by the OptiTrack to the windows computer?

I’ll also take take a look at the second link. Thank for both links!
whoenig
Expert
Posts: 395
Joined: Mon Oct 27, 2014 2:55 am

Re: Optitrack to Crazyflie Set up

Post by whoenig »

The Optitrack documentation should have some more information. For most mocap systems it is recommended to use multiple network cards on the Windows PC, one for Optitrack and one to connect to other computers. You can either directly connect the two PC using ethernet (and define static IPs), or more commonly, connect the two using a router in-between, which has a DHCP server running. It is possible to use WiFi, but not recommended as this significantly increases your latency of the measurements.
curiousstudent
Beginner
Posts: 18
Joined: Sun Jan 05, 2020 6:52 pm

Re: Optitrack to Crazyflie Set up

Post by curiousstudent »

Thank you for your reply.

So with the two computers connected with only ethernet, no DHCP server would need to be running? And with the ethernet solution where would I define the static IP?


And the options that you listed (ethernet, router, wifi) would all also need the nannet sdk right (I just want to make sure of that part)?
whoenig
Expert
Posts: 395
Joined: Mon Oct 27, 2014 2:55 am

Re: Optitrack to Crazyflie Set up

Post by whoenig »

Direct Ethernet connection: Yes, no need for a DHCP server. You can configure a static IP in your OS network settings, which is OS dependent (you should be able to find instructions using a search engine). A router is a bit more convenient (plug&play).

NatNetSDK: No, the crazyswarm comes with the SDK already included. You would only need that for custom applications.
curiousstudent
Beginner
Posts: 18
Joined: Sun Jan 05, 2020 6:52 pm

Re: Optitrack to Crazyflie Set up

Post by curiousstudent »

So for the router connection I assume I would use the lan ports on the router?
whoenig
Expert
Posts: 395
Joined: Mon Oct 27, 2014 2:55 am

Re: Optitrack to Crazyflie Set up

Post by whoenig »

Yes. Each PC just goes to the LAN port. You can also connect to the Internet by connecting the router's Internet port to your campus network, but that is optional.
curiousstudent
Beginner
Posts: 18
Joined: Sun Jan 05, 2020 6:52 pm

Re: Optitrack to Crazyflie Set up

Post by curiousstudent »

Thank you!. I will try this and I might have more questions later.
Post Reply