Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added error feedback to service responses #21

Open
wants to merge 7 commits into
base: humble
Choose a base branch
from

Conversation

nicolaslauzon
Copy link

@nicolaslauzon nicolaslauzon commented Jun 12, 2024

Improving usability of wiln

Why?

To improve usability I created a foxglove interface where we can easily call the services and have good feedback on wheter it works or not.

The foxglove interface is named Warthog_TnR_Foxglove.json.

How ?

I added proper responses to every services in wiln.
⚠️ There is still a few that I assume will work. We should do some error checking on those. (Link in comments)

I also added a status publisher to be able to see in which state wiln is curently in. It's a more complete version of this PR

Tests

✔️ I tested :

  1. Start recording
  2. Stop recording
  3. Cancel trajectory
  4. Play trajectory once
  5. Clear trajectory

⚠️ not tested :

  1. Save LTR
  2. Load LTR
  3. Play loop trajectory

@@ -487,7 +505,11 @@ class WilnNode : public rclcpp::Node
}

ltrFile.close();
RCLCPP_INFO(this->get_logger(), "LTR file succesfully saved");

// TODO: handle errors
Copy link
Author

Choose a reason for hiding this comment

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

TODO : handle errors from saveLTRServiceCallback

@@ -617,32 +639,46 @@ class WilnNode : public rclcpp::Node
void loadLTRServiceCallback(const std::shared_ptr<wiln::srv::LoadMapTraj::Request> req, std::shared_ptr<wiln::srv::LoadMapTraj::Response> res)
{
loadLTR(req->file_name.data, false);

// TODO : handle errors
Copy link
Author

Choose a reason for hiding this comment

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

TODO : handle errors from LoadLTRServiceCallback

return;
}

void loadLTRFromEndServiceCallback(const std::shared_ptr<wiln::srv::LoadMapTraj::Request> req, std::shared_ptr<wiln::srv::LoadMapTraj::Response> res)
{
loadLTR(req->file_name.data, true);

// TODO : handle errors
Copy link
Author

Choose a reason for hiding this comment

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

TODO : handle errors from LoadLTRFromEndServiceCallback

@boxanm boxanm self-assigned this Jun 18, 2024
@boxanm boxanm added the enhancement New feature or request label Jun 18, 2024
@nicolaslauzon nicolaslauzon marked this pull request as ready for review June 25, 2024 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants