Skip to content
This repository has been archived by the owner on Feb 21, 2021. It is now read-only.

Commit

Permalink
Merge pull request #403 from RoboticsURJC/3DViewer
Browse files Browse the repository at this point in the history
#401 #378 Fixed name 3DViewer issues
  • Loading branch information
chanfr committed Mar 31, 2016
2 parents 514a0f5 + 80cd5db commit c9c6d7d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions src/stable/components/3DViewer/3DViewer.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

#Visualization Config
Visualization.Endpoints=default -h 0.0.0.0 -p 9957
Visualization.Name=viewer
3DViewer.Endpoints=default -h 0.0.0.0 -p 9957
3DViewer.Name=viewer

NamingService.Enabled=0
NamingService.Proxy=NamingServiceJdeRobot:default -h 0.0.0.0 -p 10000
3DViewer.Enabled=0
3DViewer.Proxy=NamingServiceJdeRobot:default -h 0.0.0.0 -p 10000
4 changes: 2 additions & 2 deletions src/stable/components/3DViewer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ IF (with_pcl)
${easyiceconfig_LIBRARY_DIRS}
)

add_executable (jdeViewer ${SOURCE_FILES})
add_executable (3DViewer ${SOURCE_FILES})

TARGET_LINK_LIBRARIES(jdeViewer
TARGET_LINK_LIBRARIES(3DViewer
jderobotutil
${OpenCV_LIBRARIES}
${OpenCVGUI_LIBRARIES}
Expand Down
6 changes: 3 additions & 3 deletions src/stable/components/3DViewer/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ int main(int argc, char** argv)
ic = EasyIce::initialize(argc, argv);

Ice::PropertiesPtr prop = ic->getProperties();
std::string Endpoints = prop->getProperty("Visualization.Endpoints");
std::string Endpoints = prop->getProperty("3DViewer.Endpoints");

// Naming Service
int nsActive = prop->getPropertyAsIntWithDefault("NamingService.Enabled", 0);
Expand All @@ -152,8 +152,8 @@ int main(int argc, char** argv)
}
}

Ice::ObjectAdapterPtr adapter =ic->createObjectAdapterWithEndpoints("Visualization", Endpoints);
std::string objPrefix("Visualization.");
Ice::ObjectAdapterPtr adapter =ic->createObjectAdapterWithEndpoints("3DViewer", Endpoints);
std::string objPrefix("3DViewer.");
std::string viewerName = prop->getProperty(objPrefix + "Name");
Ice::ObjectPtr object = new visualization::VisualizationI(objPrefix, ic);

Expand Down
4 changes: 2 additions & 2 deletions src/stable/libs/jderobotViewer/JderobotViewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@ void JderobotViewer::refresh_thread(){
while (!viewer->wasStopped() || this->exitSinal)
{
this->new_data_mutex.lock();
viewer->spinOnce (100);
viewer->spinOnce ();
if (this->signalSave){
this->viewer->saveScreenshot(name2save);
this->signalSave=false;
}
this->new_data_mutex.unlock();
boost::this_thread::sleep (boost::posix_time::microseconds (100000));
boost::this_thread::sleep (boost::posix_time::microseconds (10000));
}
}

Expand Down

0 comments on commit c9c6d7d

Please sign in to comment.