Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Add Navigation Stack to Stage Simulation #27

Merged
merged 13 commits into from
Apr 3, 2022
Merged

Conversation

zghera
Copy link
Member

@zghera zghera commented Feb 27, 2022

What is a quick description of the change?

Add the ROS 2D navigation stack with teb_local_planner set as the local planner.

Is this fixing an issue?

Closes #20

Were any issues created as a result of this change?

#34 and #35

Are there more details that are relevant?

Initially looked at just using teb_local_planner with the current ASSv2 architecture. However, teb's API is made to interface with move_base and we would end up having to reimplement a portion of move_base's functionality to obtain the same cmd_vel topic that we need. Thus, it made sense to add move_base back.

With this change, the only major difference between the v2 and v1 architectures is the SLAM module (using rtabmap instead of hector_mapping).

Check lists (check x in [ ] of list items)

For each of these items, please refer to the software style guide

  • Test written/updated
  • Tests passing
  • Logging (where appropriate)
  • Coding style

Any additional comments?

Note: This was a huge PR. Not advisable for most other PRs. However, it was arguably appropriate in this case given the hefty requirements of move_base.

RQT Graph
move-base-stage-rqt

Tf Tree
move-base-stage-tf

@zghera zghera changed the base branch from master to ISS23 February 27, 2022 17:13
@zghera zghera self-assigned this Feb 27, 2022
Base automatically changed from ISS23 to master February 27, 2022 17:59
Made a few changes to this package to support a stage sim with move_base: 1. renamed the package for a bit more clarity in case we create another simulation package using something other than stage_ros (i.e. fssim). 2. Added a params folder to hold the amcl param file from teb_local_planner tuts.3. Added yaml file for track for the map server node. 4. Modified the top-level launch file stage.launch to include move_base, amcl, and map_server.
@zghera zghera force-pushed the issue-20-local-planner branch from d1bb7dc to 31fdf95 Compare February 27, 2022 22:43
@zghera zghera marked this pull request as ready for review March 6, 2022 16:25
Copy link
Contributor

@alanssitis alanssitis left a comment

Choose a reason for hiding this comment

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

I am currently encountering an issue where amcl and map_server are not being launched when running roslaunch sim_stage stage.launch . Currently trying to find the root of the issue. Also, you mixed tabs and spaces in sim_stage/launch/stage.launch ; there may be more since I haven't looked at other files that closely. Shouldn't be a big deal and could be automated in the future, so could be ignored for now and be dealt with in Issue #18 .

@zghera
Copy link
Member Author

zghera commented Mar 28, 2022

I am currently encountering an issue where amcl and map_server are not being launched when running roslaunch sim_stage stage.launch . Currently trying to find the root of the issue. Also, you mixed tabs and spaces in sim_stage/launch/stage.launch ; there may be more since I haven't looked at other files that closely. Shouldn't be a big deal and could be automated in the future, so could be ignored for now and be dealt with in Issue #18 .

Weird it is working on my local build. @Reschivon , did you try to run it?

I tried also running in docker. It appears there is an issue when trying to catkin_make.
Using devel:

$ amp-cli devel --build
Building containers...
Step 1/2: Building amp-devel:noetic-desktop.
 ---> Finished building amp-devel:noetic-desktop.
Step 2/2: Building amp-devel:frame-desktop.
 ---> Finished building amp-devel:frame-desktop.
Running amp-devel:frame-desktop...
Use [<Ctrl> + D] to stop and exit the container.
Entering container amp-assv2-scratch:d2837809cc.

root@ubuntu:/amp_ws# catkin_make
Base path: /amp_ws
Source space: /amp_ws/src
Build space: /amp_ws/build
Devel space: /amp_ws/devel
Install space: /amp_ws/install
####
#### Running command: "cmake /amp_ws/src -DCATKIN_DEVEL_PREFIX=/amp_ws/devel -DCMAKE_INSTALL_PREFIX=/amp_ws/install -G Unix Makefiles" in "/amp_ws/build"
####
CMake Error: The current CMakeCache.txt directory /amp_ws/build/CMakeCache.txt is different than the directory /home/z/Documents/AMP_ASSv2/build where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt
CMake Error: The source "/amp_ws/src/CMakeLists.txt" does not match the source "/home/z/Documents/AMP_ASSv2/src/CMakeLists.txt" used to generate cache.  Re-run cmake with a different source directory.
Invoking "cmake" failed

Using scratch:

$ amp-cli scratch --build
Building containers...
Step 1/3: Building amp-devel:noetic-desktop.
 ---> Finished building amp-devel:noetic-desktop.
Step 2/3: Building amp-devel:frame-desktop.
 ---> Finished building amp-devel:frame-desktop.
Step 3/3: Building amp-devel:mesa-build.
Error: Ran into an error, look at the help menu.
Error The command '/bin/bash -c . /opt/ros/noetic/setup.bash &&     rosdep install --from-paths src -r -y &&     catkin_make' returned a non-zero code: 1

How are you testing on this branch @alanssitis ?

@alanssitis
Copy link
Contributor

Via amp-cli, my comments above address the fix.

@zghera
Copy link
Member Author

zghera commented Mar 30, 2022

Via amp-cli, my comments above address the fix.

For reference: @alanssitis and I had some discussions offline. The related fixes to the amp-cli tool from those discussions are in #37 . Once that PR is merged I will test my fix for the issue of amcl and map_server not being launched.

@alanssitis alanssitis self-requested a review April 3, 2022 16:48
Copy link
Contributor

@alanssitis alanssitis left a comment

Choose a reason for hiding this comment

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

LGTM

@alanssitis alanssitis merged commit 0504ea9 into master Apr 3, 2022
@alanssitis alanssitis deleted the issue-20-local-planner branch April 3, 2022 16:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a Local Planner
3 participants