Subsystem integration#136
Subsystem integration#136mjeronimo merged 12 commits intoros-navigation:masterfrom mjeronimo:subsystem-integration
Conversation
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.
| @@ -0,0 +1,7 @@ | |||
| image: test_map.pgm | |||
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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*/); |
There was a problem hiding this comment.
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.
| @@ -0,0 +1,38 @@ | |||
| // Copyright 2016 Open Source Robotics Foundation, Inc. | |||
There was a problem hiding this comment.
This looks like new code. Is this copyright correct?
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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. | |||
|
|
||
| if (rclcpp::spin_until_future_complete(node_, result_future) != | ||
| rclcpp::executor::FutureReturnCode::SUCCESS) | ||
| { |
There was a problem hiding this comment.
I think this is a linter failure. Opening brace needs to be on the same line as the if typically.
There was a problem hiding this comment.
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"), |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Yes, I agree; the client can control the timeout and output a message, if desired. Removed.
ghost
left a comment
There was a problem hiding this comment.
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 | |||
There was a problem hiding this comment.
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_; |
There was a problem hiding this comment.
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) | |||
There was a problem hiding this comment.
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.
Co-authored-by: andriimaistruk <andriimaistruk>
* 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>
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.