Skip to content

Implement reset functionality for control module#6

Open
michaelwestern1 wants to merge 3 commits intomainfrom
pc-87-reset-update
Open

Implement reset functionality for control module#6
michaelwestern1 wants to merge 3 commits intomainfrom
pc-87-reset-update

Conversation

@michaelwestern1
Copy link

Merge Request / Pull Request

Summary of Changes

Briefly describe what this MR/PR does and which issue/task it addresses.

Type of Change

  • Bug fix
  • New feature / task
  • Refactor
  • Documentation

Checklist (to be completed before review)

  • Code follows team standards
  • Tested locally
  • Tests added / updated if relevant
  • Documentation updated if relevant
  • CI / checks pass

Related Issue / Task

  • Closes #[issue_number] (if applicable)

Notes / Additional Context

Any context for reviewers (limitations, known issues, future work)

@michaelwestern1 michaelwestern1 requested a review from a team as a code owner November 27, 2025 22:04
@alyashour
Copy link
Member

Please resolve your merge conflicts before the review.

Copy link
Member

@alyashour alyashour left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no implementation for handle_reset in this mr. You've added it to the header file but there is no actual reset functionality.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work!

<name>ap1_control</name>
<version>0.1.0</version>
<description>AP1 Control Node</description>
<maintainer email="alyashour1@gmail.com">Aly Ashour</maintainer>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you change Ashour lmao

<exec_depend>ap1_msgs</exec_depend>

<!-- Upstream format (valid for both build + exec) -->
<depend>rclcpp</depend>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have there's no need for <build_depend> and <exec_depend> also. Remove them

package.xml Outdated
<exec_depend>geometry_msgs</exec_depend>
<exec_depend>ap1_msgs</exec_depend>

<!-- Upstream format (valid for both build + exec) -->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These comments about the merge aren't needed.

#include "ap1_msgs/msg/turn_angle_stamped.hpp"
#include "ap1_msgs/msg/vehicle_speed_stamped.hpp"

// ---- Your Reset Service ----
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this artifact and others. Things like (upstream) and (your ...) don't make sense to include.

float last_velocity_ = 0.0f;
float last_error_ = 0.0f;
float integral_term_ = 0.0f;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These states should definitely not be in the control node. They are properties of the controller (icontroller instance).

// Memory
// half these types are very unnecessary, we should just have stampedfloat or
// stamped double or something
// Cached “latest values”
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What latest values? These are messages. This comment should be replaced with something clearer. There is a mr that does the modification the comment asks for so just remove it.

ap1_msgs::msg::VehicleSpeedStamped vehicle_speed_;
ap1_msgs::msg::TurnAngleStamped vehicle_turn_angle;
ap1_msgs::msg::TurnAngleStamped vehicle_turn_angle_;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch

rclcpp::Publisher<ap1_msgs::msg::TurnAngleStamped>::SharedPtr turning_angle_pub_;
rclcpp::Publisher<ap1_msgs::msg::MotorPowerStamped>::SharedPtr motor_power_pub_; // between -1 and 1? probably
rclcpp::Publisher<ap1_msgs::msg::MotorPowerStamped>::SharedPtr motor_power_pub_;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did you move the class methods to be between the subscriptions and publishers?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants