Skip to content

Commit

Permalink
[Beetle][Nav] limiting target frame of assembly nav to CoG frame
Browse files Browse the repository at this point in the history
  • Loading branch information
sugihara-16 committed Jul 9, 2024
1 parent 336cb2f commit 8e6ccd6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions robots/beetle/src/beetle_navigation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ void BeetleNavigator::naviCallback(const aerial_robot_msgs::FlightNavConstPtr &
tf::Vector3 target_cog_pos(msg->target_pos_x, msg->target_pos_y, 0);
if(msg->target == aerial_robot_msgs::FlightNav::BASELINK)
{
if(current_assembled_)
{
ROS_ERROR("[Nav] Only cog frame is available during assembled state!");
return;
}
/* check the transformation */
tf::Transform cog2baselink_tf;
tf::transformKDLToTF(robot_model_->getCog2Baselink<KDL::Frame>(), cog2baselink_tf);
Expand Down Expand Up @@ -280,6 +285,11 @@ void BeetleNavigator::naviCallback(const aerial_robot_msgs::FlightNavConstPtr &
tf::Vector3 target_cog_pos(0, 0, msg->target_pos_z);
if(msg->target == aerial_robot_msgs::FlightNav::BASELINK)
{
if(current_assembled_)
{
ROS_ERROR("[Nav] Only CoG can be set as a target frame during assembled state!");
return;
}
/* check the transformation */
tf::Transform cog2baselink_tf;
tf::transformKDLToTF(robot_model_->getCog2Baselink<KDL::Frame>(), cog2baselink_tf);
Expand Down

0 comments on commit 8e6ccd6

Please sign in to comment.