Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
sadanand1120 committed Dec 9, 2024
1 parent a64e847 commit 8a84f84
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
20 changes: 10 additions & 10 deletions src/navigation/navigation_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,6 @@ void LoadConfig(navigation::NavigationParameters* params) {

config_reader::ConfigReader reader({FLAGS_robot_config});
params->do_intermed = !FLAGS_no_intermed;
params->ldos_pub_overlay_carrot = FLAGS_ldos_pub_overlay_carrot;
if (FLAGS_dt > 0) {
params->dt = FLAGS_dt;
} else {
Expand Down Expand Up @@ -913,15 +912,16 @@ void ImageCallback(const sensor_msgs::CompressedImageConstPtr& msg) {

if (FLAGS_ldos_pub_overlay_carrot) {
// add overlay to image
static const Eigen::Affine3f frame_tf_ =
Eigen::Translation3f(0, 0, 0.85) *
Eigen::AngleAxisf(0.0, Vector3f::UnitX());
Eigen::Vector2f carrot(0, 0);
bool foundCarrot = navigation_.GetLocalCarrot(carrot);
const Vector3f p = frame_tf_ * Vector3f(carrot.x(), carrot.y(), 0);
std_msgs::String msg;
msg.data = "overlay: " + std::to_string(p.x()) + ", " + std::to_string(p.y()) + ", " + std::to_string(p.z()) + ", " + std::to_string(foundCarrot);
ldos_overlay_carrot_pub_.publish(msg);
// static const Eigen::Affine3f frame_tf_ =
// Eigen::Translation3f(0, 0, 0.85) *
// Eigen::AngleAxisf(0.0, Vector3f::UnitX());
// Eigen::Vector2f carrot(0, 0);
// bool foundCarrot = navigation_.GetLocalCarrot(carrot);
// const Vector3f p = frame_tf_ * Vector3f(carrot.x(), carrot.y(), 0);
std_msgs::String msg_str;
msg_str.data = "dump";
// msg_str.data = "overlay: " + std::to_string(p.x()) + ", " + std::to_string(p.y()) + ", " + std::to_string(p.z()) + ", " + std::to_string(foundCarrot);
ldos_overlay_carrot_pub_.publish(msg_str);
}

// Update GUI Window
Expand Down
1 change: 0 additions & 1 deletion src/navigation/navigation_parameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ struct MotionLimits {
struct NavigationParameters {
// whether to use intermediate planning or not
bool do_intermed;
bool ldos_pub_overlay_carrot;
// Control period in seconds.
double dt;
// Motion limits for linear motion.
Expand Down

0 comments on commit 8a84f84

Please sign in to comment.