-
Notifications
You must be signed in to change notification settings - Fork 540
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Limiting the scope of variables #874 Limited the scope of variables in moveit_core/collision_detection * Update moveit_core/collision_detection/src/collision_octomap_filter.cpp Co-authored-by: AndyZe <[email protected]> * Update moveit_core/collision_detection/src/collision_octomap_filter.cpp Co-authored-by: AndyZe <[email protected]> * Update moveit_core/collision_detection/src/collision_octomap_filter.cpp Co-authored-by: AndyZe <[email protected]> * convert float to double * change double to float * Feedback fixes * Introduced variables removed from previous merge commit * Updated GL_Renderer function definitions with double instead of float * Changed update() function arguments to float since it is a derived virtual function and needs to be overriden * Fixed all override errors in visualization * *Fixed override errors in perception *Changed reinterpret_cast to double* from float* * change variable types to fit function definition * Fixed clang-tidy warnings * Fixed scope of reusable variables --------- Co-authored-by: Salah Soliman <[email protected]> Co-authored-by: AndyZe <[email protected]> Co-authored-by: Henning Kayser <[email protected]>
- Loading branch information
1 parent
27e5d0e
commit 6482350
Showing
33 changed files
with
109 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,7 +70,7 @@ class GLRenderer | |
* \param[in] near distance of the near clipping plane in meters | ||
* \param[in] far distance of the far clipping plane in meters | ||
*/ | ||
GLRenderer(unsigned width, unsigned height, float near = 0.1, float far = 10.0); | ||
GLRenderer(unsigned width, unsigned height, double near = 0.1, double far = 10.0); | ||
|
||
/** \brief destructor, destroys frame buffer objects and OpenGL context*/ | ||
~GLRenderer(); | ||
|
@@ -106,7 +106,7 @@ class GLRenderer | |
* \author Suat Gedikli ([email protected]) | ||
* \param[out] buffer pointer to memory where the depth values need to be stored | ||
*/ | ||
void getDepthBuffer(float* buffer) const; | ||
void getDepthBuffer(double* buffer) const; | ||
|
||
/** | ||
* \brief loads, compiles, links and adds GLSL shaders from files to the current OpenGL context. | ||
|
@@ -135,29 +135,29 @@ class GLRenderer | |
* \param[in] cx x component of principal point | ||
* \param[in] cy y component of principal point | ||
*/ | ||
void setCameraParameters(float fx, float fy, float cx, float cy); | ||
void setCameraParameters(double fx, double fy, double cx, double cy); | ||
|
||
/** | ||
* \brief sets the near and far clipping plane distances in meters | ||
* \author Suat Gedikli ([email protected]) | ||
* \param[in] near distance of the near clipping plane in meters | ||
* \param[in] far distance of the far clipping plane in meters | ||
*/ | ||
void setClippingRange(float near, float far); | ||
void setClippingRange(double near, double far); | ||
|
||
/** | ||
* \brief returns the distance of the near clipping plane in meters | ||
* \author Suat Gedikli ([email protected]) | ||
* \return distance of near clipping plane in meters | ||
*/ | ||
const float& getNearClippingDistance() const; | ||
const double& getNearClippingDistance() const; | ||
|
||
/** | ||
* \brief returns the distance of the far clipping plane in meters | ||
* \author Suat Gedikli ([email protected]) | ||
* \return distance of the far clipping plane in meters | ||
*/ | ||
const float& getFarClippingDistance() const; | ||
const double& getFarClippingDistance() const; | ||
|
||
/** | ||
* \brief returns the width of the frame buffer objectsin pixels | ||
|
@@ -281,10 +281,10 @@ class GLRenderer | |
GLuint program_; | ||
|
||
/** \brief distance of near clipping plane in meters*/ | ||
float near_; | ||
double near_; | ||
|
||
/** \brief distance of far clipping plane in meters*/ | ||
float far_; | ||
double far_; | ||
|
||
/** \brief focal length in x-direction of camera in pixels*/ | ||
float fx_; | ||
|
@@ -299,11 +299,11 @@ class GLRenderer | |
float cy_; | ||
|
||
/** \brief map from thread id to OpenGL context */ | ||
static std::map<std::thread::id, std::pair<unsigned, GLuint> > context_; | ||
static std::map<std::thread::id, std::pair<unsigned, GLuint> > context; | ||
|
||
/* \brief lock for context map */ | ||
static std::mutex context_lock_; | ||
static std::mutex context_lock; | ||
|
||
static bool glutInitialized_; | ||
static bool glut_initialized; | ||
}; | ||
} // namespace mesh_filter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -131,7 +131,7 @@ class MeshFilterBase | |
* \author Suat Gedikli ([email protected]) | ||
* \param[out] depth pointer to buffer to be filled with depth values. | ||
*/ | ||
void getFilteredDepth(float* depth) const; | ||
void getFilteredDepth(double* depth) const; | ||
|
||
/** | ||
* \brief retrieves the labels of the rendered model | ||
|
@@ -149,7 +149,7 @@ class MeshFilterBase | |
* \author Suat Gedikli ([email protected]) | ||
* \param[out] depth pointer to buffer to be filled with depth values. | ||
*/ | ||
void getModelDepth(float* depth) const; | ||
void getModelDepth(double* depth) const; | ||
|
||
/** | ||
* \brief set the shadow threshold. points that are further away than the rendered model are filtered out. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.