ros-navigation / docs.nav2.org Goto Github PK
View Code? Open in Web Editor NEWhttps://docs.nav2.org/
Home Page: https://docs.nav2.org/
License: Apache License 2.0
https://docs.nav2.org/
Home Page: https://docs.nav2.org/
License: Apache License 2.0
Hello,
I am new to ROS and I don't know if this is the right place to ask about this.
I did research but I couldn't find anything about how to calculate some planner metrics.
I would like to run a wide variety of planners SmacPlanner, A*, Hybrid-A* and varying some parameters while measuring the time to obtain the global path and its length. For now, I'm clueless about how to do it.
Additionally, I would like to set the initial pose and the goal pose programmatically so I can guarantee that the start and final poses are always the same. I do not have this precision using rviz commands. I tried publishing to the topic /initialpose with the following command but without success.
ros2 topic pub -1 /initialpose geometry_msgs/PoseWithCovarianceStamped '{ header: {stamp: {sec: 0, nanosec: 0}, frame_id: "map"}, pose: { pose: {position: {x: 10, y: 10.0, z: 00.0}, orientation: {w: 0.1}}, } }'
Said that I have the following questions:
e.g. a more focused version of what @gramss proposed in #87
1. Build with GCOV enabled
$ cd ~/navigation2_ws/
$ colcon build --symlink-install --packages-select nav2_map_server --cmake-args -DCMAKE_CXX_FLAGS='--coverage' -DCMAKE_C_FLAGS='--coverage'
2. Run testcase manually
$ ./build/nav2_map_server/test/unit/test_costmap_filter_info_server
3. Run LCOV to get html-file
$ lcov --capture --directory build/nav2_map_server/CMakeFiles/map_server_core.dir/src/costmap_filter_info --output-file coverage.info
(in order to get what directory to specify to LCOV I've found required *.gcda file from all file list:
$ find "build/nav2_costmap_2d/" -name "*.gcda")
$ genhtml coverage.info --output-directory out
$ firefox out/index.html
Like a model zoo!
N
algorithm pluginsFor Foxy
and Eloquent
, sudo apt install ros-<ros2-distro>-turtlebot3*
does not work because there are no turtlebot3 releases for those distros (yet).
For Dashing
, ros2 launch nav2_bringup tb3_simulation_launch.py
does not work because tb3_simulation_launch.py
does not exist for Dashing
. I believe it only exist for the master branch right now.
stvl_layer:
plugin: "spatio_temporal_voxel_layer/SpatioTemporalVoxelLayer" # For Galactic and later
enabled: true
voxel_decay: 15.
decay_model: 0
voxel_size: 0.05
track_unknown_space: true
max_obstacle_height: 2.0
unknown_threshold: 15
mark_threshold: 0
update_footprint_enabled: true
combination_method: 1
obstacle_range: 3.0 <------------------------------------------
origin_z: 0.0
publish_voxel_map: true
transform_tolerance: 0.2
mapping_mode: false
map_save_duration: 60.0
observation_sources: pointcloud
pointcloud:
data_type: PointCloud2
topic: /intel_realsense_r200_depth/points
marking: true
clearing: true
min_obstacle_height: 0.0
max_obstacle_height: 2.0
expected_update_rate: 0.0
observation_persistence: 0.0
inf_is_valid: false
voxel_filter: false
clear_after_reading: true
max_z: 7.0
min_z: 0.1
vertical_fov_angle: 0.8745
horizontal_fov_angle: 1.048
decay_acceleration: 15.0
model_type: 0
should be
stvl_layer:
plugin: "spatio_temporal_voxel_layer/SpatioTemporalVoxelLayer" # For Galactic and later
enabled: true
voxel_decay: 15.
decay_model: 0
voxel_size: 0.05
track_unknown_space: true
max_obstacle_height: 2.0
unknown_threshold: 15
mark_threshold: 0
update_footprint_enabled: true
combination_method: 1
origin_z: 0.0
publish_voxel_map: true
transform_tolerance: 0.2
mapping_mode: false
map_save_duration: 60.0
observation_sources: pointcloud
pointcloud:
data_type: PointCloud2
topic: /intel_realsense_r200_depth/points
marking: true
clearing: true
obstacle_range: 3.0 <------------------------------------------
min_obstacle_height: 0.0
max_obstacle_height: 2.0
expected_update_rate: 0.0
observation_persistence: 0.0
inf_is_valid: false
voxel_filter: false
clear_after_reading: true
max_z: 7.0
min_z: 0.1
vertical_fov_angle: 0.8745
horizontal_fov_angle: 1.048
decay_acceleration: 15.0
model_type: 0
To help with some level of versioning knowledge
All the tutorials and demo plugins use shared pointers but we've changed them to all weak pointers for shutdown. We need to update all the tutorials to reflect the new interfaces
On https://navigation.ros.org/getting_started/index.html the Link to the "Official Turtlebot" totorial ends up in 404 for
https://emanual.robotis.com/docs/en/platform/turtlebot3/ros2_setup/
Not sure what file here would have to be changed.
Under this link, https://navigation.ros.org/setup_guides/urdf/setup_urdf.html#urdf-and-the-robot-state-publisher, there is one bug on defining the model URDF for the tutorial. Box inertia macro is not being defined, suggest to remove the box inertia from the tutorial.
#40 / tutorial
Everything has started correctly,but i see RViz is not same with example.
Terminal log
[rviz2-4] [INFO] [1620814689.516360373] [rviz2]: Sending lifecycle_manager_navigation/is_active request
[controller_server-8] [INFO] [1620814689.663454946] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[controller_server-8] [INFO] [1620814690.163460701] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[rviz2-4] [INFO] [1620814690.516628649] [rviz2]: Waiting for the lifecycle_manager_navigation/is_active service...
[rviz2-4] [INFO] [1620814690.516904289] [rviz2]: Sending lifecycle_manager_navigation/is_active request
[controller_server-8] [INFO] [1620814690.663472256] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[controller_server-8] [INFO] [1620814691.163521513] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[rviz2-4] [INFO] [1620814691.517209295] [rviz2]: Waiting for the lifecycle_manager_navigation/is_active service...
[rviz2-4] [INFO] [1620814691.517323420] [rviz2]: Sending lifecycle_manager_navigation/is_active request
[controller_server-8] [INFO] [1620814691.663448091] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[controller_server-8] [INFO] [1620814692.163458359] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[rviz2-4] [INFO] [1620814692.517511862] [rviz2]: Waiting for the lifecycle_manager_navigation/is_active service...
[rviz2-4] [INFO] [1620814692.517769372] [rviz2]: Sending lifecycle_manager_navigation/is_active request
[controller_server-8] [INFO] [1620814692.663533549] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[controller_server-8] [INFO] [1620814693.163441092] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[rviz2-4] [INFO] [1620814693.518019871] [rviz2]: Waiting for the lifecycle_manager_navigation/is_active service...
[rviz2-4] [INFO] [1620814693.518340054] [rviz2]: Sending lifecycle_manager_navigation/is_active request
[controller_server-8] [INFO] [1620814693.663472293] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[controller_server-8] [INFO] [1620814694.163513538] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[rviz2-4] [INFO] [1620814694.518620436] [rviz2]: Waiting for the lifecycle_manager_navigation/is_active service...
[rviz2-4] [INFO] [1620814694.518962508] [rviz2]: Sending lifecycle_manager_navigation/is_active request
[controller_server-8] [INFO] [1620814694.663537256] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[controller_server-8] [INFO] [1620814695.163507291] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[rviz2-4] [INFO] [1620814695.519258071] [rviz2]: Waiting for the lifecycle_manager_navigation/is_active service...
[rviz2-4] [INFO] [1620814695.519401372] [rviz2]: Sending lifecycle_manager_navigation/is_active request
[controller_server-8] [INFO] [1620814695.663532535] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[controller_server-8] [INFO] [1620814696.163442466] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[rviz2-4] [INFO] [1620814696.519603464] [rviz2]: Waiting for the lifecycle_manager_navigation/is_active service...
[rviz2-4] [INFO] [1620814696.519803784] [rviz2]: Sending lifecycle_manager_navigation/is_active request
[controller_server-8] [INFO] [1620814696.663513751] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[controller_server-8] [INFO] [1620814697.163442398] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[rviz2-4] [INFO] [1620814697.519981387] [rviz2]: Waiting for the lifecycle_manager_navigation/is_active service...
[rviz2-4] [INFO] [1620814697.520090025] [rviz2]: Sending lifecycle_manager_navigation/is_active request
[controller_server-8] [INFO] [1620814697.663491973] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[controller_server-8] [INFO] [1620814698.163440455] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[rviz2-4] [INFO] [1620814698.520417511] [rviz2]: Waiting for the lifecycle_manager_navigation/is_active service...
[rviz2-4] [INFO] [1620814698.520726287] [rviz2]: Sending lifecycle_manager_navigation/is_active request
[controller_server-8] [INFO] [1620814698.663471188] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[controller_server-8] [INFO] [1620814699.163510043] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[rviz2-4] [INFO] [1620814699.520943222] [rviz2]: Waiting for the lifecycle_manager_navigation/is_active service...
[rviz2-4] [INFO] [1620814699.521256701] [rviz2]: Sending lifecycle_manager_navigation/is_active request
[controller_server-8] [INFO] [1620814699.663409862] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[controller_server-8] [INFO] [1620814700.163473784] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[rviz2-4] [INFO] [1620814700.521562637] [rviz2]: Waiting for the lifecycle_manager_navigation/is_active service...
[rviz2-4] [INFO] [1620814700.521761501] [rviz2]: Sending lifecycle_manager_navigation/is_active request
[controller_server-8] [INFO] [1620814700.663462220] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[controller_server-8] [INFO] [1620814701.163479939] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[rviz2-4] [INFO] [1620814701.522007006] [rviz2]: Waiting for the lifecycle_manager_navigation/is_active service...
[rviz2-4] [INFO] [1620814701.522330351] [rviz2]: Sending lifecycle_manager_navigation/is_active request
[controller_server-8] [INFO] [1620814701.663412686] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[controller_server-8] [INFO] [1620814702.163447950] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[rviz2-4] [INFO] [1620814702.522602517] [rviz2]: Waiting for the lifecycle_manager_navigation/is_active service...
[rviz2-4] [INFO] [1620814702.522765393] [rviz2]: Sending lifecycle_manager_navigation/is_active request
[controller_server-8] [INFO] [1620814702.663515204] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[controller_server-8] [INFO] [1620814703.163440517] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[rviz2-4] [INFO] [1620814703.522988751] [rviz2]: Waiting for the lifecycle_manager_navigation/is_active service...
[rviz2-4] [INFO] [1620814703.523099107] [rviz2]: Sending lifecycle_manager_navigation/is_active request
[controller_server-8] [INFO] [1620814703.663478590] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[controller_server-8] [INFO] [1620814704.163518520] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[rviz2-4] [INFO] [1620814704.523302103] [rviz2]: Waiting for the lifecycle_manager_navigation/is_active service...
[rviz2-4] [INFO] [1620814704.523416608] [rviz2]: Sending lifecycle_manager_navigation/is_active request
After following the getting started installation steps, when running the example step 3 ros2 launch nav2_bringup tb3_simulation_launch.py
yields an error complaining about not not finding the launch file.
Error message:
file 'tb3_simulation_launch.py' was not found in the share directory of package 'nav2_bringup' which is at '/opt/ros/dashing/share/nav2_bringup'
The version of the nav2_bringup package installed form the Ubuntu repository is 0.2.6 and doesn't contain tb3_simulation_launch.py, however it contains nav2_simulation_launch.py which perform the expected task. So I guess this needs to be changed till the Ubuntu repository package is updated with whats on github.
To help with some level of versioning knowledge
I was reading through the documentation of Regulated Pure Pursuit Controller and bumped onto the field called max_angular_accel
with the unit as m/s/s
.
I don't know if this is correct or if it has to be rad/s/s
?
https://navigation.ros.org/configuration/packages/configuring-regulated-pp.html
speed restricted zones is one such application, but you can also have any arbitrary server publish to it to limit the max speed based on payload weight or any other metric you like
Required Info:
I was working on the tutorial for keepout filter as given in
"https://navigation.ros.org/tutorials/docs/navigation2_with_keepout_filter.html#"
Build is completed without problem. and run costmap filter demo by this command after loading install/setup.bash.
ros2 launch nav2_costmap_filters_demo costmap_filter_info.launch.py params_file:=src/navigation2_tutorials/nav2_costmap_filters_demo/params/keepout_params.yaml mask:=src/navigation2_tutorials/nav2_costmap_filters_demo/maps/keepout_mask.yaml
The node for the Costmap filter should start up.
When the node starts, it causes an error and exits.
[INFO] [launch]: All log files can be found below /home/user/.ros/log/2021-03-30-11-17-40-144274-ade-29027
[INFO] [launch]: Default logging verbosity is set to INFO
Task exception was never retrieved
future: <Task finished name='Task-2' coro=<LaunchService._process_one_event() done, defined at /opt/ros/foxy/lib/python3.8/site-packages/launch/launch_service.py:271> exception=SubstitutionFailure("executable 'costmap_filter_info_server' not found on the libexec directory '/home/user/nav2_ws/install/nav2_map_server/lib/nav2_map_server' ")>
Traceback (most recent call last):
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/launch_service.py", line 273, in _process_one_event
await self.__process_event(next_event)
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/launch_service.py", line 293, in __process_event
visit_all_entities_and_collect_futures(entity, self.__context))
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 45, in visit_all_entities_and_collect_futures
futures_to_return += visit_all_entities_and_collect_futures(sub_entity, context)
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 45, in visit_all_entities_and_collect_futures
futures_to_return += visit_all_entities_and_collect_futures(sub_entity, context)
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 45, in visit_all_entities_and_collect_futures
futures_to_return += visit_all_entities_and_collect_futures(sub_entity, context)
[Previous line repeated 1 more time]
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 38, in visit_all_entities_and_collect_futures
sub_entities = entity.visit(context)
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/action.py", line 108, in visit
return self.execute(context)
File "/opt/ros/foxy/lib/python3.8/site-packages/launch_ros/actions/node.py", line 426, in execute
ret = super().execute(context)
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/actions/execute_process.py", line 775, in execute
self.__expand_substitutions(context)
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/actions/execute_process.py", line 635, in __expand_substitutions
cmd = [perform_substitutions(context, x) for x in self.__cmd]
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/actions/execute_process.py", line 635, in <listcomp>
cmd = [perform_substitutions(context, x) for x in self.__cmd]
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/utilities/perform_substitutions_impl.py", line 26, in perform_substitutions
return ''.join([context.perform_substitution(sub) for sub in subs])
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/utilities/perform_substitutions_impl.py", line 26, in <listcomp>
return ''.join([context.perform_substitution(sub) for sub in subs])
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/launch_context.py", line 184, in perform_substitution
return substitution.perform(self)
File "/opt/ros/foxy/lib/python3.8/site-packages/launch_ros/substitutions/executable_in_package.py", line 84, in perform
raise SubstitutionFailure(
launch.substitutions.substitution_failure.SubstitutionFailure: executable 'costmap_filter_info_server' not found on the libexec directory '/home/user/nav2_ws/install/nav2_map_server/lib/nav2_map_server'
[INFO] [lifecycle_manager-1]: process started with pid [29029]
[INFO] [map_server-2]: process started with pid [29031]
Task exception was never retrieved
future: <Task finished name='Task-12' coro=<LaunchService._process_one_event() done, defined at /opt/ros/foxy/lib/python3.8/site-packages/launch/launch_service.py:271> exception=AttributeError("'NoneType' object has no attribute 'complete'")>
Traceback (most recent call last):
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/launch_service.py", line 273, in _process_one_event
await self.__process_event(next_event)
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/launch_service.py", line 293, in __process_event
visit_all_entities_and_collect_futures(entity, self.__context))
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 38, in visit_all_entities_and_collect_futures
sub_entities = entity.visit(context)
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/action.py", line 108, in visit
return self.execute(context)
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/actions/opaque_function.py", line 75, in execute
return self.__function(context, *self.__args, **self.__kwargs)
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/actions/execute_process.py", line 422, in __on_signal_process_event
if self._subprocess_protocol.complete.done():
AttributeError: 'NoneType' object has no attribute 'complete'
[INFO] [lifecycle_manager-1]: sending signal 'SIGINT' to process[lifecycle_manager-1]
[ERROR] [lifecycle_manager-1]: process has died [pid 29029, exit code -2, cmd '/home/user/nav2_ws/install/nav2_lifecycle_manager/lib/nav2_lifecycle_manager/lifecycle_manager --ros-args -r __node:=lifecycle_manager_costmap_filters -r __ns:=/ --params-file /tmp/launch_params_hqoca0e4 --params-file /tmp/launch_params_znumjetd --params-file /tmp/launch_params_vvmpq6kj'].
[map_server-2] 1617070660.211140 [0] map_server: using network interface eno1 (udp/10.87.134.100) selected arbitrarily from: eno1, docker0
[map_server-2] [INFO] [1617070660.214656386] [filter_mask_server]:
[map_server-2] filter_mask_server lifecycle node launched.
[map_server-2] Waiting on external lifecycle transitions to activate
[map_server-2] See https://design.ros2.org/articles/node_lifecycle.html for more information.
[map_server-2] [INFO] [1617070660.214702749] [filter_mask_server]: Creating
[ERROR] [map_server-2]: process[map_server-2] failed to terminate '5' seconds after receiving 'SIGINT', escalating to 'SIGTERM'
[INFO] [map_server-2]: sending signal 'SIGTERM' to process[map_server-2]
[ERROR] [map_server-2]: process has died [pid 29031, exit code -15, cmd '/home/user/nav2_ws/install/nav2_map_server/lib/nav2_map_server/map_server --ros-args -r __node:=filter_mask_server -r __ns:=/ --params-file /tmp/tmpd2md3kma'].
I have reviewed the source files to be loaded, etc., but the problem was not solved.
(I have also loaded the setup.bash for both ROS2 and Navigation2.)
I also tried rebuilding Navigation2 and installing out using apt since it said costmap_filter_info_server was not found, but the problem was not solved.
Is there any idea why it doesn't work on this issue?
Add documentation related to ros-navigation/navigation2#2111 to navigation.ros.org
SteveMacenski ;
jediofgever;
navsat_transform_node
params needs to be set true, which will be covered in navigation.ros.org PR;I show here some questions I have about implementing a convenient PlannerSelector that could be potentially integrated into the navigation stack.
Goal: the planer selector/goal selector is a "component" that listen to the ROS network (via an action server or a topic) and is used in the Behavior Tree to store the desired planner or controller. External task-level ros nodes may decide what is the best planner to use and use this mechanism.
Note: This same design principles can be applied to the concept of GoalSelector if the FollowPath action request message is extended with some new goal_id additional field.
In the following code it is shown an example about how the planner selector could be integrated in a navigation-bt.
<root main_tree_to_execute="MainTree">
<BehaviorTree ID="MainTree">
<RecoveryNode number_of_retries="6" name="NavigateRecovery">
<PipelineSequence name="NavigateWithReplanning">
<PlannerSelector default_controller_id="FollowPath" default_planner_id="GridBased"/>
<RateController hz="0.1">
<ComputePathToPose goal="{goal}" path="{path}"/>
</RateController>
<FollowPath path="{path}"/>
</PipelineSequence>
<ReactiveFallback name="RecoveryFallback">
<GoalUpdated/>
</ReactiveFallback>
</RecoveryNode>
</BehaviorTree>
</root>
Description
Previous experiments
I tried to implement the concept explained above. The ROS network communication mechanism used was "node parameters". The PlannerSelector had a PlannerSelector::onParametersUpdated callback and checked if the "PlannerSelector.planner_id" and/or "PlannerSelector.controler_id" where updated.
However I got some weird behavior. It looked like many of the parameter updates "were lost".
Why it did not work? This was my interpretation about what happened (Please correct me if you think I am wrong): The lifetime of the PlannerSelector is short. Because of that the PlannerSelector::onParametersUpdated was not called. (Can someone tell me if this hypothesis of the short-lifetime is correct?)
Successful workaround
Since that first approach failed I used a Decorator instead of a regular BTNode.
Already exist a PlannerSelector experiment in the following fork (PlannerSelector.hpp and PlannerSelector.cpp)
The resulting BT is like the following shown below:
<root main_tree_to_execute="MainTree">
<BehaviorTree ID="MainTree">
<RecoveryNode number_of_retries="6" name="NavigateRecovery">
<PlannerSelector default_controller_id="FollowPath" default_planner_id="GridBased">
<PipelineSequence name="NavigateWithReplanning">
<RateController hz="0.1">
<ComputePathToPose goal="{goal}" path="{path}"/>
</RateController>
<FollowPath path="{path}"/>
</PipelineSequence>
</PlannerSelector>
<ReactiveFallback name="RecoveryFallback">
<GoalUpdated/>
</ReactiveFallback>
</RecoveryNode>
</BehaviorTree>
</root>
Results and usage
This solution (fork https://github.com/pabloinigoblasco/navigation2): works properly using parameters updates from the terminal like it is shown below:
ros2 parameter set /bt_navigator PlannerSelector.controller_id "MyController"
or
ros2 parameter set /bt_navigator PlannerSelector.planner_id "MyPlanner"
Open issues
There is some criticism related with the usage of parameters. for me it is okay also to use any another mechanism (topics, actions or services). This approach was originally selected mimicking the concept of dynamic_reconfigure server of the move_base node (ROS 1)
** Other related issues and PRs **
PR
Need to change the CircleCI workflow on publishing to make sure we don't nuke the CNAME file (or recreate it each time) in the gh-pages
deployment branch.
This file is required so the website is hosted on navigation.ros.org
vs ros-planning.github.io/navigation.ros.org
.
and using it
List of parameters with their state (https://github.com/ros-planning/navigation2/blob/master/doc/parameters/param_list.md):
When following the instructions here on a fresh install of Ubuntu Focal, I had to install some dependencies that were not mentioned on the instructions.
First step (Build ROS 2 Master) went smoothly.
For the second step (Build Navigation2 Dependencies) I had to add the following dependencies:
# install boost
sudo apt install libboost-all-dev
# install gazeebo
curl -sSL http://get.gazebosim.org | sh
For the third step (Build Navigation2 Master) I had to add the following dependencies:
sudo apt install libgraphicsmagick++1-dev
Afterwards, I realized there is a troubleshooting guide, and repeated the process adding the proper call to rosdep
before doing colcon build
Perhaps the best solution would be to add the rosdep
step to the instructions.
The Turtlebot 3 manual link in the warning section on this page is pointing to a page that doesn't exist.
Make a navigation package / bring up for a custom robot (probably in a custom map / simulation environment / hardware too)
https://github.com/ros-planning/navigation2/blob/main/nav2_msgs/action/NavigateToPose.action#L8-L11
and how to use it to estimate ETA
Message type -> layer or algorithm to use:
PC2 -> voxel grid
laser scan -> obstacle
maps -> static
inflation
sonar / ir -> range #50
radar / sonar / PC2 / 3D lidar -> STVL
keep out / speed zones -> costmap filters
to show-case how to use it correctly, as a tutorial and also have this Bt included in nav2_bt_navigator
xml set.
Maybe a docking subtree with changing controllers on if environment is "dynamic" and changing the goal checker tolerances by request (docking fine, general coarser). Change planning algorithm if the first fails. That should highlight all 3 changes and showcase how to use 1 as a recovery and the other 2 as specific application example changes. Or maybe if its a pick-up-and-drop-off-box. the pick up is fine because you know where the box is, but the drop-off is coarse resolution because its just a general area
Under this link, https://navigation.ros.org/setup_guides/urdf/setup_urdf.html#urdf-and-the-robot-state-publisher, there is one bug. The box inertia macro is not defined in this case, and it will cause error while building it. It is suggested to be removed to reduce misunderstanding.
Give folks direct access to source to PR against with updates.
mention both in plugin, but also in calling remote service / action / topic / parameter
As @mikeferguson has so kindly leveraged this tool in his rehabilitation of Sparky (or whatever you named it ๐ )
https://navigation.ros.org/configuration/packages/configuring-dwb-controller.html
The sample at the bottom of the page is not up to date after the progress/goal checkers have been pulled out into separate plugins.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.