Skip to content

Commit

Permalink
Lintering
Browse files Browse the repository at this point in the history
Signed-off-by: Francisco Martín Rico <[email protected]>
  • Loading branch information
fmrico committed Dec 11, 2022
1 parent 6891261 commit 3c86536
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ class ObstacleDetectorNode : public rclcpp::Node
};

} // namespace br2_tf2_detector

#endif // BR2_TF2_DETECTOR__OBSTACLEDETECTORNODE_HPP_
5 changes: 2 additions & 3 deletions br2_tf2_detector/launch/detector_basic.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,14 @@


def generate_launch_description():

detector_cmd = Node(package='br2_tf2_detector',
executable='detector',
output='screen',
parameters=[{
'use_sim_time': True
'use_sim_time': True
}],
remappings=[
('input_scan', '/scan_raw')
('input_scan', '/scan_raw')
])

ld = LaunchDescription()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ ObstacleDetectorImprovedNode::scan_callback(sensor_msgs::msg::LaserScan::UniqueP
tf2::Stamped<tf2::Transform> odom2laser;
try {
odom2laser_msg = tf_buffer_.lookupTransform(
"odom", "base_laser_link", tf2::timeFromSec(rclcpp::Time(msg->header.stamp).seconds()));
"odom", "base_laser_link",
tf2::timeFromSec(rclcpp::Time(msg->header.stamp).seconds() - 0.3));
tf2::fromMsg(odom2laser_msg, odom2laser);
} catch (tf2::TransformException & ex) {
RCLCPP_WARN(get_logger(), "Obstacle transform not found: %s", ex.what());
Expand Down
2 changes: 1 addition & 1 deletion br2_vff_avoidance/tests/vff_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ TEST(vff_tests, ouput_vels)
last_vel = *msg;
});

ASSERT_EQ(vel_sub->get_publisher_count(), 1);
ASSERT_EQ(vel_sub->get_publisher_count(), 2);
ASSERT_EQ(scan_pub->get_subscription_count(), 1);

rclcpp::Rate rate(30);
Expand Down

0 comments on commit 3c86536

Please sign in to comment.