Commit b0e8eca2 authored by bucyril's avatar bucyril
Browse files

some changes downstairs with vicon data. It works!

parent 535f8e67
......@@ -106,7 +106,7 @@ void MainGUIWindow::setPosMarkers(const ptrToMessage& p_msg) //connected to newV
if(i >= markers_vector.size()) //some new markers coming
{
ROS_INFO_STREAM("element index: " << i << " added");
QPointF p(p_msg->markers[i].x * FROM_METERS_TO_UNITS, p_msg->markers[i].y * FROM_METERS_TO_UNITS);
QPointF p(p_msg->markers[i].x * FROM_MILIMETERS_TO_UNITS, p_msg->markers[i].y * FROM_MILIMETERS_TO_UNITS);
Marker* tmp_p_marker = new Marker(scene->mapFromWorldToScene(p));
markers_vector.push_back(tmp_p_marker); // what happens with the new indexes? check if this is correct
......@@ -122,7 +122,7 @@ void MainGUIWindow::setPosMarkers(const ptrToMessage& p_msg) //connected to newV
else
{
ROS_INFO_STREAM("element index: " << i << " moved, already existed");
markers_vector[i]->setPosMarker(scene->mapFromWorldToScene(QPointF(p_msg->markers[i].x * FROM_METERS_TO_UNITS, p_msg->markers[i].y * FROM_METERS_TO_UNITS)));
markers_vector[i]->setPosMarker(scene->mapFromWorldToScene(QPointF(p_msg->markers[i].x * FROM_MILIMETERS_TO_UNITS, p_msg->markers[i].y * FROM_MILIMETERS_TO_UNITS)));
}
}
}
......
......@@ -51,7 +51,7 @@ int main(int argc, char* argv[]) {
float f = 0;
int i = 0;
// while(ros::ok())
while(true)
/*while(true)
{
if(i % 1000 == 0)
{
......@@ -89,7 +89,7 @@ int main(int argc, char* argv[]) {
ros::Duration(0.1).sleep();
f += 0.01;
i++;
}
}*/
//the testing code will not go further than here if testing without real ViconData
......@@ -151,9 +151,9 @@ int main(int argc, char* argv[]) {
UnlabeledMarker marker;
UnlabeledMarkersArray markersArray;
ROS_INFO_STREAM("unlabeledMarkerCount: " << unlabeledMarkerCount);
for(int unlabeledMarkerIndex = 0; i < unlabeledMarkerCount; i++)
for(int unlabeledMarkerIndex = 0; unlabeledMarkerIndex < unlabeledMarkerCount; unlabeledMarkerIndex++)
{
Output_GetUnlabeledMarkerGlobalTranslation OutputTranslation =
......@@ -165,6 +165,7 @@ int main(int argc, char* argv[]) {
marker.z = OutputTranslation.Translation[2];
markersArray.markers.push_back(marker);
ROS_INFO_STREAM("inside marker loop, index: " << unlabeledMarkerIndex);
}
unlabeledMarkersPublisher.publish(markersArray);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment