Has anyone tried using the CrazySwarm repo with UWBs/Loco Positioning Node, instead of vicon/optitrack? If so, any tips to help in configuring the setup?
I found this in their version of crazyflie_ros/crazyflie_driver/src in mocap_helper.cpp.
Code: Select all
#ifdef ENABLE_VICON
else if (motionCaptureType == "vicon")
{
std::string hostName;
nl.getParam("vicon_host_name", hostName);
mocap = new libmotioncapture::MotionCaptureVicon(hostName,
/*enableObjects*/ false,
/*enablePointcloud*/ true);
}
#endif
#ifdef ENABLE_OPTITRACK
else if (motionCaptureType == "optitrack")
{
std::string localIP;
std::string serverIP;
nl.getParam("optitrack_local_ip", localIP);
nl.getParam("optitrack_server_ip", serverIP);
mocap = new libmotioncapture::MotionCaptureOptitrack(localIP, serverIP);
}
#endif
#ifdef ENABLE_PHASESPACE
else if (motionCaptureType == "phasespace")
{
std::string ip;
int numMarkers;
nl.getParam("phasespace_ip", ip);
nl.getParam("phasespace_num_markers", numMarkers);
std::map<size_t, std::pair<int, int> > cfs;
cfs[231] = std::make_pair<int, int>(10, 11);
mocap = new libmotioncapture::MotionCapturePhasespace(ip, numMarkers, cfs);
}