Revision: 7661
http://playerstage.svn.sourceforge.net/playerstage/?rev=7661&view=rev
Author: natepak
Date: 2009-05-14 15:54:32 +0000 (Thu, 14 May 2009)
Log Message:
-----------
Added GuiAPI
Modified Paths:
--------------
code/gazebo/trunk/server/CMakeLists.txt
code/gazebo/trunk/server/Simulator.cc
code/gazebo/trunk/server/Simulator.hh
code/gazebo/trunk/server/gui/CMakeLists.txt
code/gazebo/trunk/server/physics/MapGeom.cc
Modified: code/gazebo/trunk/server/CMakeLists.txt
===================================================================
--- code/gazebo/trunk/server/CMakeLists.txt 2009-05-14 13:50:38 UTC (rev
7660)
+++ code/gazebo/trunk/server/CMakeLists.txt 2009-05-14 15:54:32 UTC (rev
7661)
@@ -28,11 +28,10 @@
LINK_DIRECTORIES(
${CMAKE_BINARY_DIR}/libgazebo
+ ${CMAKE_BINARY_DIR}/server/gui
${boost_library_dirs}
${freeimage_library_dir}
${gazeboserver_link_dirs}
- sensors
- controllers
)
########################################
@@ -64,6 +63,8 @@
Angle.cc
Param.cc
GraphicsIfaceHandler.cc
+ GuiAPI.cc
+ Simulator.cc
)
SET (headers Common.hh
@@ -86,6 +87,8 @@
Angle.hh
Param.hh
GraphicsIfaceHandler.hh
+ GuiAPI.hh
+ Simulator.hh
)
APPEND_TO_SERVER_HEADERS(${headers})
@@ -93,7 +96,7 @@
ADD_LIBRARY(gazebo_server SHARED ${gazeboserver_sources})
-ADD_EXECUTABLE(gazebo-exec Simulator.cc main.cc)
+ADD_EXECUTABLE(gazebo-exec main.cc)
SET_TARGET_PROPERTIES(gazebo-exec PROPERTIES OUTPUT_NAME "gazebo")
LIST_TO_STRING(GAZEBO_CFLAGS "${gazeboserver_cflags}")
@@ -105,16 +108,17 @@
${CMAKE_LINK_FLAGS_${CMAKE_BUILD_TYPE}})
ENDIF (CMAKE_LINK_FLAGS_${CMAKE_BUILD_TYPE})
-TARGET_LINK_LIBRARIES( gazebo-exec gazebo_gui
+TARGET_LINK_LIBRARIES( gazebo-exec
${gazeboserver_link_libs}
${FLTK_LIBRARIES}
${boost_libraries}
${freeimage_library}
gazebo_server
+ gazebo_gui
gazebo
)
-TARGET_LINK_LIBRARIES( gazebo_server ${gazeboserver_link_libs} )
+TARGET_LINK_LIBRARIES( gazebo_server ${ODE_LIBRARIES} gazebo)
INSTALL (TARGETS gazebo-exec DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
INSTALL (TARGETS gazebo_server DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
Modified: code/gazebo/trunk/server/Simulator.cc
===================================================================
--- code/gazebo/trunk/server/Simulator.cc 2009-05-14 13:50:38 UTC (rev
7660)
+++ code/gazebo/trunk/server/Simulator.cc 2009-05-14 15:54:32 UTC (rev
7661)
@@ -36,9 +36,8 @@
#include "Entity.hh"
#include "OgreVisual.hh"
#include "World.hh"
-#include "Gui.hh"
#include "XMLConfig.hh"
-#include "Gui.hh"
+#include "GuiAPI.hh"
#include "GazeboConfig.hh"
#include "gazebo.h"
#include "PhysicsEngine.hh"
@@ -191,12 +190,11 @@
int x = childNode->GetTupleInt("pos",0,0);
int y = childNode->GetTupleInt("pos",1,0);
- //gzmsg(1) << "Creating GUI: Pos[" << x << " " << y << "] Size[" <<
width << " " << height << "]\n";
+ //gzmsg(1) << "Creating GUI: Pos[" << x << " " << y
+ // << "] Size[" << width << " " << height << "]\n";
// Create the GUI
- this->gui = new Gui(x, y, width, height, "Gazebo");
- Fl::check();
- Fl::wait(0.3);
+ this->gui = new GuiAPI(x, y, width, height, "Gazebo");
this->gui->Load(childNode);
}
}
@@ -381,13 +379,6 @@
}
////////////////////////////////////////////////////////////////////////////////
-/// Gets our current GUI interface
-Gui *Simulator::GetUI() const
-{
- return this->gui;
-}
-
-////////////////////////////////////////////////////////////////////////////////
/// Gets local configuration for this computer
GazeboConfig *Simulator::GetGazeboConfig() const
{
Modified: code/gazebo/trunk/server/Simulator.hh
===================================================================
--- code/gazebo/trunk/server/Simulator.hh 2009-05-14 13:50:38 UTC (rev
7660)
+++ code/gazebo/trunk/server/Simulator.hh 2009-05-14 15:54:32 UTC (rev
7661)
@@ -43,7 +43,7 @@
/// \{
// Forward declarations
- class Gui;
+ class GuiAPI;
class Server;
class SimulationIface;
class XMLConfig;
@@ -85,9 +85,6 @@
/// \brief Main simulation loop, when this loop ends the simulation finish
public: void MainLoop();
- /// \brief Gets our current GUI interface
- public: Gui *GetUI() const;
-
/// \brief Gets the local configuration for this computer
public: GazeboConfig *GetGazeboConfig() const;
@@ -191,11 +188,10 @@
private: XMLConfig *xmlFile;
/// Pointer to the selected Gui
- private: Gui *gui;
+ private: GuiAPI *gui;
private: OgreAdaptor *renderEngine;
- /// Pointer to the selected Gui
private: GazeboConfig *gazeboConfig;
/// Flag to know if we have a simulation loaded
Modified: code/gazebo/trunk/server/gui/CMakeLists.txt
===================================================================
--- code/gazebo/trunk/server/gui/CMakeLists.txt 2009-05-14 13:50:38 UTC (rev
7660)
+++ code/gazebo/trunk/server/gui/CMakeLists.txt 2009-05-14 15:54:32 UTC (rev
7661)
@@ -15,7 +15,11 @@
GLFrameManager.hh
GLFrame.hh
)
+
ADD_LIBRARY(gazebo_gui STATIC ${sources})
+ADD_LIBRARY(gazebo_gui-shared SHARED ${sources})
-#APPEND_TO_SERVER_SOURCES(${sources})
-#APPEND_TO_SERVER_HEADERS(${headers})
+#SET_TARGET_PROPERTIES(gazebo_gui-static PROPERTIES OUTPUT_NAME "gazebo_gui")
+SET_TARGET_PROPERTIES(gazebo_gui-shared PROPERTIES OUTPUT_NAME "gazebo_gui")
+
+INSTALL (TARGETS gazebo_gui gazebo_gui-shared DESTINATION
${CMAKE_INSTALL_PREFIX}/lib)
Modified: code/gazebo/trunk/server/physics/MapGeom.cc
===================================================================
--- code/gazebo/trunk/server/physics/MapGeom.cc 2009-05-14 13:50:38 UTC (rev
7660)
+++ code/gazebo/trunk/server/physics/MapGeom.cc 2009-05-14 15:54:32 UTC (rev
7661)
@@ -326,7 +326,7 @@
//int diff = labs(freePixels - occPixels);
- if (node->width*node->height > this->granularityP->GetValue())
+ if ((int)(node->width*node->height) > (**this->granularityP))
{
float newX, newY;
float newW, newH;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit