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

RST-9755 Move service calls to power cycle lidars to the uam_node #37

Merged
merged 25 commits into from May 22, 2024

Conversation

SushiRaj99
Copy link

@SushiRaj99 SushiRaj99 commented Apr 17, 2024

This PR moves the service calls to power cycle the lidars from the lidar_check node in locus_vector to the urg_node. This is being done in order to reduce the number of unnecessary lidar restarts being seen on Vector 1.2

laser_restart.webm

@@ -229,7 +294,8 @@ void UamROS::configureTimerCallback(const ros::TimerEvent& event)
if (!configured_ && !configure())
{
// Configuration failed. Restart the timer to try again.
configure_timer_.start();
ROS_ERROR_STREAM("Failed to configure the lidar. Retrying in " << params_.reconfiguration_timeout.toSec()

Choose a reason for hiding this comment

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

Why did you remove the timer? Timer is stopped at the top, this will never run again if it fails to connect to the lidar

Comment on lines 189 to 195
if (should_reset_lidar)
{
ROS_WARN_STREAM("Trying to restart the lidar.");
if (lidarHardReset())
{
ROS_WARN_STREAM("Lidar reset successful. Reconfiguring the lidar.");
triggerReconfigure();
}
}

Choose a reason for hiding this comment

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

Suggested change
if (should_reset_lidar)
{
ROS_WARN_STREAM("Trying to restart the lidar.");
if (lidarHardReset())
{
ROS_WARN_STREAM("Lidar reset successful. Reconfiguring the lidar.");
triggerReconfigure();
}
}
if (should_reset_lidar)
{
ROS_WARN_STREAM("Trying to restart the lidar.");
if (lidarHardReset())
{
ROS_WARN_STREAM("Lidar reset successful.");
}
}
triggerReconfigure();

Comment on lines 183 to 185
else{
triggerReconfigure();
}

Choose a reason for hiding this comment

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

Suggested change
else{
triggerReconfigure();
}

@SushiRaj99 SushiRaj99 merged commit fa7ebbb into locus-devel May 22, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants