Skip to content

Commit

Permalink
More warnings fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
betwo committed May 22, 2021
1 parent 789c1e9 commit eb04ebf
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions path_control/src/direct_path_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class DirectPath
{
try{//Try to get the latest avaiable Transform
tfl_.lookupTransform(targetFrame, sourceFrame, time, trans);
}catch(tf::TransformException ex){//if not available, then wait
}catch(const tf::TransformException& ex){//if not available, then wait
(void) ex;
if(!tfl_.waitForTransform(targetFrame, sourceFrame, time, ros::Duration(0.5))){
ROS_WARN_STREAM_THROTTLE(1, "cannot lookup transform from :" << targetFrame << " to " << sourceFrame);
Expand All @@ -138,7 +138,7 @@ class DirectPath
{
try{//Try to get the latest avaiable Transform
tfl_.transformPose(targetFrame,*pose,result);
}catch(tf::TransformException ex){//if not available, then wait
}catch(const tf::TransformException& ex){//if not available, then wait
(void) ex;
if(!tfl_.waitForTransform(targetFrame, pose->header.frame_id, pose->header.stamp, ros::Duration(0.5))){
ROS_WARN_STREAM_THROTTLE(1, "cannot lookup transform from: " << targetFrame << " to " << pose->header.frame_id);
Expand Down Expand Up @@ -172,7 +172,7 @@ class DirectPath
result.paths.push_back(dpath);
}

}catch(tf::TransformException ex){//if not available, then wait
}catch(const tf::TransformException& ex){//if not available, then wait
(void) ex;
if(!tfl_.waitForTransform(targetFrame, path->header.frame_id, path->header.stamp, ros::Duration(1.0))){
ROS_WARN_STREAM_THROTTLE(1, "cannot lookup transform from :" << targetFrame << " to " << path->header.frame_id);
Expand Down
2 changes: 1 addition & 1 deletion path_follower/src/controller/robotcontroller_ekm_TT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ bool RobotController_EKM_TT::targetTransform2base(ros::Time& now,Waypoint pathEn

try{//Try to get the latest avaiable Transform
transformer_->lookupTransform(world_frame, robot_frame, ros::Time(0), now_map_to_base);
}catch(tf::TransformException ex){//if not available, then wait
}catch(const tf::TransformException& ex){//if not available, then wait
(void) ex;
if(!transformer_->waitForTransform(world_frame, robot_frame, now, ros::Duration(0.1))){
ROS_WARN_THROTTLE_NAMED(1, "local_path", "cannot transform map to odom");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ RobotController::MoveCommandStatus RobotController_Velocity_TT::computeMoveComma

processPose(pose);
}
catch(tf::TransformException ex)
catch(const tf::TransformException& ex)
{
ROS_WARN_THROTTLE(1, "Velocity_TT: cannot lookup tf target!");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ bool HighSpeedLocalPlanner::transform2Odo(ros::Time& now)

try{//Try to get the latest avaiable Transform
transformer_->lookupTransform(world_frame, odom_frame, ros::Time(0), now_map_to_odom);
}catch(tf::TransformException ex){//if not available, then wait
}catch(const tf::TransformException& ex){//if not available, then wait
(void) ex;
if(!transformer_->waitForTransform(world_frame, odom_frame, now, ros::Duration(0.1))){
ROS_WARN_THROTTLE_NAMED(1, "local_path", "cannot transform map to odom");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ bool LocalPlannerModel::GetTransform(ros::Time time,std::string targetFrame, std
{
try{//Try to get the latest avaiable Transform
transformer_->lookupTransform(targetFrame, sourceFrame, time, trans);
}catch(tf::TransformException ex){//if not available, then wait
}catch(const tf::TransformException& ex){//if not available, then wait
(void) ex;
if(!transformer_->waitForTransform(targetFrame, sourceFrame, time, ros::Duration(0.05))){
ROS_WARN_STREAM_THROTTLE_NAMED(1, "LocalPlannerModel", "cannot lookup transform from :" << targetFrame << " to " << sourceFrame);
Expand Down Expand Up @@ -476,7 +476,7 @@ bool LocalPlannerModel::transform2base(ros::Time& now)

try{//Try to get the latest avaiable Transform
transformer_->lookupTransform(world_frame, robot_frame, ros::Time(0), now_map_to_base);
}catch(tf::TransformException ex){//if not available, then wait
}catch(const tf::TransformException& ex){//if not available, then wait
(void) ex;
if(!transformer_->waitForTransform(world_frame, robot_frame, now, ros::Duration(0.1))){
ROS_WARN_THROTTLE_NAMED(1, "local_path", "cannot transform map to odom");
Expand Down Expand Up @@ -523,7 +523,7 @@ bool LocalPlannerModel::transformWPS(std::string source, std::string target, Sub

try{//Try to get the latest avaiable Transform
transformer_->lookupTransform(target, source, ros::Time(0), now_transform);
}catch(tf::TransformException ex){//if not available, then wait
}catch(const tf::TransformException& ex){//if not available, then wait
(void) ex;
if(!transformer_->waitForTransform(target, source, now, ros::Duration(0.1))){
ROS_WARN_THROTTLE_NAMED(1, "local_path", "cannot transform map to odom");
Expand Down
2 changes: 1 addition & 1 deletion tools/localmap/src/localmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ bool Localmap::GetTransform(ros::Time time,std::string targetFrame, std::string
{
try{//Try to get the latest avaiable Transform
tf_listener.lookupTransform(targetFrame, sourceFrame, time, trans);
}catch(tf::TransformException ex){//if not available, then wait
}catch(const tf::TransformException& ex){//if not available, then wait
(void) ex;
if(!tf_listener.waitForTransform(targetFrame, sourceFrame, time, ros::Duration(transformWaitTime_))){ //ros::Duration(0.05))){
ROS_WARN_STREAM_THROTTLE(0.5,"DE_Localmap: cannot lookup transform from: " << targetFrame << " to " << sourceFrame);
Expand Down
2 changes: 1 addition & 1 deletion tools/localmap/src/localmap_mc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ bool LocalmapMC::GetTransform(ros::Time time,std::string targetFrame, std::strin
{
try{//Try to get the latest avaiable Transform
tf_listener.lookupTransform(targetFrame, sourceFrame, time, trans);
}catch(tf::TransformException ex){//if not available, then wait
}catch(const tf::TransformException& ex){//if not available, then wait
(void) ex;
if(!tf_listener.waitForTransform(targetFrame, sourceFrame, time, ros::Duration(transformWaitTime_))){ //ros::Duration(0.05))){
ROS_WARN_STREAM_THROTTLE(0.5,"LocalmapMC: cannot lookup transform from: " << targetFrame << " to " << sourceFrame);
Expand Down

0 comments on commit eb04ebf

Please sign in to comment.