Skip to content

Subsystem integration#136

Merged
mjeronimo merged 12 commits intoros-navigation:masterfrom
mjeronimo:subsystem-integration
Oct 3, 2018
Merged

Subsystem integration#136
mjeronimo merged 12 commits intoros-navigation:masterfrom
mjeronimo:subsystem-integration

Conversation

@mjeronimo
Copy link

Some changes as a result of integrating the various modules into a working system. Also added a service client template class to common up some duplicate code. Added some initial launch-related files, but this still needs work.

Michael Jeronimo and others added 11 commits October 2, 2018 17:19
Simple navigator gets the goal pose from gazebo via the move_base_simpl/goal
message. The Dijkstra global planner gets the current robot pose from localization.
Simple navigator gets the goal pose from gazebo via the move_base_simpl/goal
message. The Dijkstra global planner gets the current robot pose from localization.
@mjeronimo mjeronimo requested review from a user, bpwilcox and mhpanah October 3, 2018 16:29
@@ -0,0 +1,7 @@
image: test_map.pgm
Copy link

Choose a reason for hiding this comment

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

test_map.pgm and yaml are already checked in under localization/nav2_amcl/test/maps. I'm not sure the right place to put the file, but having multiple copies of the same binary files seems like a bad idea.

Copy link
Author

Choose a reason for hiding this comment

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

I agree. As we discussed we should probably have a maps/resources package that any of the modules and tests can use. I'll file an issue.

Copy link

Choose a reason for hiding this comment

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

This may not be the test map file, but there is also a testmap.yaml & testmap.png inside mapping/nav2_map_server/test

* @param[in] filename The filename of the URDF file describing this robot.
*/
explicit RosRobot(const std::string & urdf_filename);
explicit RosRobot(rclcpp::Node *node/*, const std::string & urdf_filename*/);
Copy link

Choose a reason for hiding this comment

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

We should probably just delete the urdf_filename param and the comment above. I suspect it will be a long time before we are extracting robot params from the URDF directly.

Copy link
Author

Choose a reason for hiding this comment

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

Done.

@@ -0,0 +1,38 @@
// Copyright 2016 Open Source Robotics Foundation, Inc.
Copy link

Choose a reason for hiding this comment

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

This looks like new code. Is this copyright correct?

Copy link
Author

Choose a reason for hiding this comment

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

Oops. Copy and paste from the wrong file. Fixed them both.

RosRobot::getCurrentPose()
{
if (!initial_pose_received_)
throw std::runtime_error("RosRobot::getCurrentPose: initial pose not received yet");
Copy link

Choose a reason for hiding this comment

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

This seems more of normal event. Maybe this should just return a nullptr instead of throwing? Just a thought. Depends on how it will be used in practice I think.

Copy link
Author

Choose a reason for hiding this comment

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

I put a note in the code. We'll live with it a bit and see.

@@ -0,0 +1,38 @@
// Copyright 2016 Open Source Robotics Foundation, Inc.
Copy link

Choose a reason for hiding this comment

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

Same here on the copyright

Copy link
Author

Choose a reason for hiding this comment

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

Fixed


if (rclcpp::spin_until_future_complete(node_, result_future) !=
rclcpp::executor::FutureReturnCode::SUCCESS)
{
Copy link

Choose a reason for hiding this comment

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

I think this is a linter failure. Opening brace needs to be on the same line as the if typically.

Copy link
Author

Choose a reason for hiding this comment

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

I thought so too, but this is what uncrustify wanted. I think it had to do with the expression broken on the previous line. It passed cpplint and uncrustify.

if (!rclcpp::ok()) {
throw std::runtime_error("waitForServer: interrupted while waiting for service to appear");
}
RCLCPP_INFO(rclcpp::get_logger("rclcpp"),
Copy link

Choose a reason for hiding this comment

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

I'd prefer a client object to not spit out console messages that the user has no control over, but if you really need this, the name used in the get_logger call should be something specific. You get a name passed in the constructor that you could use instead.

Copy link
Author

Choose a reason for hiding this comment

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

Yes, I agree; the client can control the timeout and output a message, if desired. Removed.

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

When I follow the bringup procedure with the Turtlebot 3 packages, cmd_vel is still called cmd_vel.

I think we shouldn't have changed the default topic names, but rather just remapped them to work with Turtlebot 2

@@ -0,0 +1,7 @@
image: test_map.pgm
Copy link

Choose a reason for hiding this comment

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

This may not be the test map file, but there is also a testmap.yaml & testmap.png inside mapping/nav2_map_server/test

{
(void)request_header;
(void)req;
// occ_resp_.map = map_msg_;
Copy link

Choose a reason for hiding this comment

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

I suppose we could get rid of the map_msg_ and only work with occ_resp_.map throughout the file.

@@ -80,6 +80,9 @@ void PlannerTester::spinThread()
void PlannerTester::loadMap(const std::string image_file_path, const std::string yaml_file_name)
Copy link

Choose a reason for hiding this comment

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

This function duplicates a lot of code from the nav2_map_server. I think it takes from a utility file (map_loader) in libs that duplicates the loadMapFromFile functionality. Do we want this to make that utility as part of libs or keep it maintained in nav2_map_server? My caution is that if we are loading files other than the types here (in this case Occupancy Grids), it would require extensions in the utility functions in addition to the nav2_map_server.

@mjeronimo mjeronimo merged commit 350533e into ros-navigation:master Oct 3, 2018
@mjeronimo mjeronimo deleted the subsystem-integration branch October 10, 2018 16:19
ghost pushed a commit to logivations/navigation2 that referenced this pull request Mar 7, 2022
Co-authored-by: andriimaistruk <andriimaistruk>
mini-1235 pushed a commit to mini-1235/navigation2 that referenced this pull request Feb 5, 2025
* Updated migration guide due to ros-navigation#1855

* Update migration/Foxy.rst

Co-authored-by: Steve Macenski <stevenmacenski@gmail.com>

* review changes incorporated, added the abbreviation definition of BT

Co-authored-by: Steve Macenski <stevenmacenski@gmail.com>
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