You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In textured_mesh_visual.cc file, the function void TexturedMeshVisual::setShaderProgram(ShaderProgram shader_program)
There is a Bug when shader_program_ change from other types to ShaderProgram::TEXTURE)
The reason is as following:
Since the tex_img_ need to be passed from cv_bridge in function void TexturedMeshVisual::setFromMessage in textured_mesh_visual.cc.
tex_img_ can recieve data only when (shader_program_ == ShaderProgram::TEXTURE).
Thus, when shader_program_ is initially not ShaderProgram::TEXTURE, the tex_img_ have no valid data.
suggestion
But when we choose ShaderProgram::TEXTURE in Rviz. We should check the tex_img_ firstly!
// origin directly updateTexture// updateTexture(mesh_material_, tex_img_);// myboyhood change to check the img cols and rowsif(!mesh_material_.isNull() &&tex_img_.cols>0&&tex_img_.rows>0){
updateTexture(mesh_material_, tex_img_);
}else{
printf("pass this Choose ShaderProgram::TEXTURE, wait for next matching!\n");
}
The text was updated successfully, but these errors were encountered:
Hello! Thanks for this useful code!
In
textured_mesh_visual.cc
file, the functionvoid TexturedMeshVisual::setShaderProgram(ShaderProgram shader_program)
There is a Bug when
shader_program_
change from other types toShaderProgram::TEXTURE)
The reason is as following:
Since the
tex_img_
need to be passed fromcv_bridge
in functionvoid TexturedMeshVisual::setFromMessage
intextured_mesh_visual.cc
.tex_img_
can recieve data only when(shader_program_ == ShaderProgram::TEXTURE)
.Thus, when
shader_program_
is initially notShaderProgram::TEXTURE
, thetex_img_
have no valid data.suggestion
But when we choose
ShaderProgram::TEXTURE
in Rviz. We should check thetex_img_
firstly!The text was updated successfully, but these errors were encountered: