[Fawkes Git] branch/fzwilling/gazebo7-fps-issue-fix: created (0.5.0-3368-gfdb1ccb)

Frederik Zwilling zwilling at kbsg.rwth-aachen.de
Thu Sep 29 15:21:44 CEST 2016


Changes have been pushed for the project "Fawkes Robotics Software Framework".

Gitweb: http://git.fawkesrobotics.org/fawkes.git
Trac:   http://trac.fawkesrobotics.org

The branch, fzwilling/gazebo7-fps-issue-fix has been created
        at  fdb1ccb7df2f4aa63938de94b42201f910fe29c3 (commit)

http://git.fawkesrobotics.org/fawkes.git/fzwilling/gazebo7-fps-issue-fix

- *Log* ---------------------------------------------------------------
commit fdb1ccb7df2f4aa63938de94b42201f910fe29c3
Author:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
AuthorDate: Thu Sep 29 15:09:11 2016 +0200
Commit:     Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
CommitDate: Thu Sep 29 15:09:11 2016 +0200

    gazebo-vis-localization: no transparency in visual msgs in gazebo 7
    
    Somehow setting the transparency in visual messages was fine in gazebo
    5, but in newer versions it causes huge FPS drops. I also removed the
    arrow above the number because it occludes it without transparency.

http://git.fawkesrobotics.org/fawkes.git/commit/fdb1ccb
http://trac.fawkesrobotics.org/changeset/fdb1ccb

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


- *Summary* -----------------------------------------------------------


- *Diffs* -------------------------------------------------------------

- *commit* fdb1ccb7df2f4aa63938de94b42201f910fe29c3 - - - - - - - - - -
Author:  Frederik Zwilling <zwilling at kbsg.rwth-aachen.de>
Date:    Thu Sep 29 15:09:11 2016 +0200
Subject: gazebo-vis-localization: no transparency in visual msgs in gazebo 7

 .../gazsim_vis_localization_thread.cpp             |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/gazebo/gazsim-vis-localization/gazsim_vis_localization_thread.cpp b/src/plugins/gazebo/gazsim-vis-localization/gazsim_vis_localization_thread.cpp
index 347f203..5f88df6 100644
--- a/src/plugins/gazebo/gazsim-vis-localization/gazsim_vis_localization_thread.cpp
+++ b/src/plugins/gazebo/gazsim-vis-localization/gazsim_vis_localization_thread.cpp
@@ -109,8 +109,8 @@ void VisLocalizationThread::loop()
 #else
     msgs::Set(geomMsg->mutable_plane()->mutable_normal(), math::Vector3(0.0, 0.0, 1.0));
     msgs::Set(geomMsg->mutable_plane()->mutable_size(), math::Vector2d(label_size_, label_size_));
-#endif
     msg_number.set_transparency(0.2);  
+#endif
     msg_number.set_cast_shadows(false);
 #if GAZEBO_MAJOR_VERSION > 5
     msgs::Set(msg_number.mutable_pose(), ignition::math::Pose3d(x, y, label_height_, 0, 0, 0));
@@ -122,7 +122,10 @@ void VisLocalizationThread::loop()
     script->add_uri(location_textures_.c_str());
     script->set_name(label_script_name_.c_str());
 
+    visual_publisher_->Publish(msg_number);
+
     //create label with direction arrow
+#if GAZEBO_MAJOR_VERSION <= 5
     msgs::Visual msg_arrow;
     msg_arrow.set_name((robot_name_ + "-localization-arrow").c_str());
     msg_arrow.set_parent_name(parent_name_.c_str());
@@ -134,8 +137,8 @@ void VisLocalizationThread::loop()
 #else
     msgs::Set(geomArrowMsg->mutable_plane()->mutable_normal(), math::Vector3(0.0, 0.0, 1.0));
     msgs::Set(geomArrowMsg->mutable_plane()->mutable_size(), math::Vector2d(0.17, 0.17));
-#endif
     msg_arrow.set_transparency(0.4);  
+#endif
     msg_arrow.set_cast_shadows(false);
 #if GAZEBO_MAJOR_VERSION > 5
     msgs::Set(msg_arrow.mutable_pose(), ignition::math::Pose3d(x, y, label_height_ + 0.01, 0, 0, ori - /*turn image right*/ M_PI / 2));
@@ -147,8 +150,7 @@ void VisLocalizationThread::loop()
     arrow_script->add_uri(location_textures_.c_str());
     arrow_script->set_name(arrow_script_name_.c_str());
 
-    //Publish with the gazebo aspect
-    visual_publisher_->Publish(msg_number);
     visual_publisher_->Publish(msg_arrow);
+#endif
   }
 }




-- 
Fawkes Robotics Framework                 http://www.fawkesrobotics.org


More information about the fawkes-commits mailing list