Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[nav2_rviz_plugins/Selector] Unable to set goal pose if we run rviz2 later #4754

Open
evshary opened this issue Nov 18, 2024 · 14 comments
Open
Labels
bug Something isn't working

Comments

@evshary
Copy link

evshary commented Nov 18, 2024

Bug report

Required Info:

  • Operating System:
    • Ubuntu 24.04
  • ROS2 Version:
    • Jazzy / Rolling
  • Version or commit hash:
  • DDS implementation:
    • CycloneDDS

Steps to reproduce issue

  • Run the simulation first
ros2 launch nav2_bringup tb3_simulation_launch.py headless:=False use_rviz:=False
  • Run the rviz2 in another terminal
ros2 launch nav2_bringup rviz_launch.py

Expected behavior

The result should do nothing with the execution order.

Actual behavior

The rviz is stuck for a while.

image

After waiting some time, we can set the initial pose, but the global costmap doesn't work properly.

image

Additional information

There is no any issue if we run rviz and nav2 together.
It also works well if we run rviz first and then nav2.

Here is the log in nav2:

[component_container_isolated-7] [WARN] [1731909745.646348226] [amcl]: AMCL cannot publish a pose or update the transform. Please set the initial pose...
[component_container_isolated-7] [INFO] [1731909745.785165110] [global_costmap.global_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist
[component_container_isolated-7] [INFO] [1731909746.285144231] [global_costmap.global_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist
[component_container_isolated-7] [INFO] [1731909746.785142621] [global_costmap.global_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist
[component_container_isolated-7] [INFO] [1731909747.285143093] [global_costmap.global_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist
[component_container_isolated-7] [INFO] [1731909747.785165097] [global_costmap.global_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist
[component_container_isolated-7] [WARN] [1731909747.853379848] [amcl]: AMCL cannot publish a pose or update the transform. Please set the initial pose...
[component_container_isolated-7] [INFO] [1731909748.285171155] [global_costmap.global_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist
[component_container_isolated-7] [INFO] [1731909748.785144203] [global_costmap.global_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist
[component_container_isolated-7] [INFO] [1731909749.285145701] [global_costmap.global_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist
[component_container_isolated-7] [INFO] [1731909749.785140808] [global_costmap.global_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist
[component_container_isolated-7] [WARN] [1731909749.878329922] [amcl]: AMCL cannot publish a pose or update the transform. Please set the initial pose...
[component_container_isolated-7] [INFO] [1731909750.285153676] [global_costmap.global_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist
[component_container_isolated-7] [INFO] [1731909750.785139863] [global_costmap.global_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist
[component_container_isolated-7] [INFO] [1731909751.285171461] [global_costmap.global_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist
[component_container_isolated-7] [INFO] [1731909751.785236796] [global_costmap.global_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist
[component_container_isolated-7] [WARN] [1731909752.085459342] [amcl]: AMCL cannot publish a pose or update the transform. Please set the initial pose...
[component_container_isolated-7] [INFO] [1731909752.285106163] [global_costmap.global_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist
[component_container_isolated-7] [INFO] [1731909752.785160362] [global_costmap.global_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist
[component_container_isolated-7] [ERROR] [1731909752.785244117] [global_costmap.global_costmap]: Failed to activate global_costmap because transform from base_link to map did not become available before timeout
[component_container_isolated-7] [ERROR] [1731909752.785606599] [lifecycle_manager_navigation]: Failed to change state for node: planner_server
[component_container_isolated-7] [ERROR] [1731909752.785636720] [lifecycle_manager_navigation]: Failed to bring up all requested nodes. Aborting bringup.
[component_container_isolated-7] [WARN] [1731909754.293492285] [amcl]: AMCL cannot publish a pose or update the transform. Please set the initial pose...
[component_container_isolated-7] [WARN] [1731909756.501404703] [amcl]: AMCL cannot publish a pose or update the transform. Please set the initial pose...
[component_container_isolated-7] [WARN] [1731909758.708340139] [amcl]: AMCL cannot publish a pose or update the transform. Please set the initial pose...
[component_container_isolated-7] [WARN] [1731909760.735512443] [amcl]: AMCL cannot publish a pose or update the transform. Please set the initial pose...
[component_container_isolated-7] [WARN] [1731909762.943117665] [amcl]: AMCL cannot publish a pose or update the transform. Please set the initial pose...
[component_container_isolated-7] [WARN] [1731909765.150435302] [amcl]: AMCL cannot publish a pose or update the transform. Please set the initial pose...
[component_container_isolated-7] [WARN] [1731909767.357452515] [amcl]: AMCL cannot publish a pose or update the transform. Please set the initial pose...
[component_container_isolated-7] [WARN] [1731909769.565269254] [amcl]: AMCL cannot publish a pose or update the transform. Please set the initial pose...
[component_container_isolated-7] [WARN] [1731909771.591201935] [amcl]: AMCL cannot publish a pose or update the transform. Please set the initial pose...
[component_container_isolated-7] [WARN] [1731909773.798548704] [amcl]: AMCL cannot publish a pose or update the transform. Please set the initial pose...
[component_container_isolated-7] [INFO] [1731909774.666120162] [amcl]: initialPoseReceived
[component_container_isolated-7] [WARN] [1731909774.666267098] [amcl]: Failed to transform initial pose in time (Lookup would require extrapolation into the future.  Requested time 82.692000 but the latest data is at time 82.656000, when looking up transform from frame [base_footprint] to frame [odom])
[component_container_isolated-7] [INFO] [1731909774.666293410] [amcl]: Setting pose (82.692000): -2.011 -0.542 0.020

I guess this log might be the key

[component_container_isolated-7] [ERROR] [1731909752.785244117] [global_costmap.global_costmap]: Failed to activate global_costmap because transform from base_link to map did not become available before timeout
[component_container_isolated-7] [ERROR] [1731909752.785606599] [lifecycle_manager_navigation]: Failed to change state for node: planner_server
[component_container_isolated-7] [ERROR] [1731909752.785636720] [lifecycle_manager_navigation]: Failed to bring up all requested nodes. Aborting bringup.
@SteveMacenski
Copy link
Member

[component_container_isolated-7] [ERROR] [1731909752.785244117] [global_costmap.global_costmap]: Failed to activate global_costmap because transform from base_link to map did not become available before timeout
[component_container_isolated-7] [ERROR] [1731909752.785606599] [lifecycle_manager_navigation]: Failed to change state for node: planner_server
[component_container_isolated-7] [ERROR] [1731909752.785636720] [lifecycle_manager_navigation]: Failed to bring up all requested nodes. Aborting bringup.

Rviz has no relationship with Nav2 in terms of functional performance. However, as the Getting Started Guide mentions, you need to give the robot its initial pose on startup so that you can complete the map->odom->base_link transformation tree. You do that in tutorial / testing using rviz, though in production its based on the known robot's last pose. If you didn't have rviz launch, then you probably didn't set this initial pose, and thus you see the global costmap timing out.

tl;dr: you need to set the initial pose. You can see this done in all Nav2 system tests, Nav2 python simple commander demos, and in other tutorial/educational demonstrations of Nav2 on GitHub :-)

@evshary
Copy link
Author

evshary commented Nov 19, 2024

Hi @SteveMacenski,
Thanks for your answer. However, I'm not sure if I get your point. I can set the initial pose after launching the rivz, but global costmap is still timed out. I know rviz is just a way to display and does nothing with nav2, so I can't understand why launching rviz later doesn't work in this case.

@SteveMacenski
Copy link
Member

SteveMacenski commented Nov 19, 2024

After waiting some time, we can set the initial pose, but the global costmap doesn't work properly.

I guess, the following snippet tells a clear story to me, but I don't discount the opportunity that I'm an idiot on occasion 😆

[component_container_isolated-7] [INFO] [1731909752.785160362] [global_costmap.global_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist
[component_container_isolated-7] [ERROR] [1731909752.785244117] [global_costmap.global_costmap]: Failed to activate global_costmap because transform from base_link to map did not become available before timeout
[component_container_isolated-7] [ERROR] [1731909752.785606599] [lifecycle_manager_navigation]: Failed to change state for node: planner_server
[component_container_isolated-7] [ERROR] [1731909752.785636720] [lifecycle_manager_navigation]: Failed to bring up all requested nodes. Aborting bringup.

...

[component_container_isolated-7] [WARN] [1731909754.293492285] [amcl]: AMCL cannot publish a pose or update the transform. Please set the initial pose...

This is telling me that the map frame isn't available -- ergo the initial pose wasn't set. Once we hit a set deadline, if we haven't got a valid TF tree, the global costmap node refuses to activate properly and returns a failure. That is new in Jazzy, previously it would retry forever, but it was pointed out that this was a bad idea. This is a parameter though that could be widened.

Then, AMCL gives us logs that it cannot do anything because initial pose wasn't set.

All roads seem to lead back to the initial pose wasn't set 🙃

@evshary
Copy link
Author

evshary commented Nov 19, 2024

I guess, the following snippet tells a clear story to me, but I don't discount the opportunity that I'm an idiot on occasion

I think this is my fault that I didn't provide a clear description. I recorded the video to help to clarify my question.

If I run nav2 first and then rviz2, the global_costmap doesn't work

nav2_rviz.mp4

However it will succeed if I have a reverse order

rviz_nav2.mp4

That is new in Jazzy, previously it would retry forever, but it was pointed out that this was a bad idea. This is a parameter though that could be widened.

Perhaps this is the reason why the issue happened. My rivz2 is stuck for some time, and this might cause the timeout of global costmap. Would you mind pointing me where the parameter is? Thank you.

@SteveMacenski
Copy link
Member

What is the logging from rviz / nav2 when the rviz display starts to respond again? Clearly something timed out and I want to know what it is / what it is related to. It seems like perhaps the same global costmap lifecycle transition.

What happens if you remove each of the Nav2 panel plugins, one at a time, and launch between them? Anyone in in particular have the issue removed if not present (again, I expect to be related to the initialization - so I would think the main Nav2 panel if any).

@evshary
Copy link
Author

evshary commented Nov 21, 2024

What is the logging from rviz / nav2 when the rviz display starts to respond again? Clearly something timed out and I want to know what it is / what it is related to. It seems like perhaps the same global costmap lifecycle transition.

After rviz display starts to respond again:

rviz2

[rviz2-1] [INFO] [1732157523.046762030] [rviz]: Message Filter dropping message: frame 'base_scan' at time 5.802 for reason 'discarding message because the queue is full'
[rviz2-1] [INFO] [1732157523.110928382] [rviz]: Message Filter dropping message: frame 'odom' at time 5.940 for reason 'discarding message because the queue is full'
[rviz2-1] [INFO] [1732157523.239344329] [rviz]: Message Filter dropping message: frame 'base_scan' at time 60.201 for reason 'discarding message because the queue is full'
[rviz2-1] [INFO] [1732157523.302777705] [rviz]: Message Filter dropping message: frame 'odom' at time 60.264 for reason 'discarding message because the queue is full'
[rviz2-1] [INFO] [1732157523.431236205] [rviz]: Message Filter dropping message: frame 'base_scan' at time 60.402 for reason 'discarding message because the queue is full'
[rviz2-1] [INFO] [1732157523.495733757] [rviz]: Message Filter dropping message: frame 'odom' at time 60.444 for reason 'discarding message because the queue is full'
[rviz2-1] [INFO] [1732157523.655407298] [rviz]: Message Filter dropping message: frame 'base_scan' at time 60.600 for reason 'discarding message because the queue is full'
[rviz2-1] [INFO] [1732157523.687198787] [rviz]: Message Filter dropping message: frame 'odom' at time 60.660 for reason 'discarding message because the queue is full'
[rviz2-1] [INFO] [1732157523.847229009] [rviz]: Message Filter dropping message: frame 'base_scan' at time 60.801 for reason 'discarding message because the queue is full'
[rviz2-1] [INFO] [1732157523.911115823] [rviz]: Message Filter dropping message: frame 'odom' at time 60.840 for reason 'discarding message because the queue is full'
[rviz2-1] [INFO] [1732157524.039079667] [rviz]: Message Filter dropping message: frame 'base_scan' at time 61.002 for reason 'discarding message because the queue is full'
[rviz2-1] [INFO] [1732157524.102697059] [rviz]: Message Filter dropping message: frame 'odom' at time 61.056 for reason 'discarding message because the queue is full'
[rviz2-1] [INFO] [1732157524.263133692] [rviz]: Message Filter dropping message: frame 'base_scan' at time 61.200 for reason 'discarding message because the queue is full'
[rviz2-1] [INFO] [1732157524.295430103] [rviz]: Message Filter dropping message: frame 'odom' at time 61.236 for reason 'discarding message because the queue is full'
[rviz2-1] [INFO] [1732157524.455102883] [rviz]: Message Filter dropping message: frame 'base_scan' at time 61.401 for reason 'discarding message because the queue is full'
[rviz2-1] [INFO] [1732157524.487568538] [rviz]: Message Filter dropping message: frame 'odom' at time 61.452 for reason 'discarding message because the queue is full'
[rviz2-1] [INFO] [1732157524.646650880] [rviz]: Message Filter dropping message: frame 'base_scan' at time 61.602 for reason 'discarding message because the queue is full'
[rviz2-1] [INFO] [1732157524.711744093] [rviz]: Message Filter dropping message: frame 'odom' at time 61.632 for reason 'discarding message because the queue is full'
[rviz2-1] [INFO] [1732157524.839211244] [rviz]: Message Filter dropping message: frame 'base_scan' at time 61.800 for reason 'discarding message because the queue is full'
...

nav2

[component_container_isolated-7] [INFO] [1732157521.039148365] [global_costmap.global_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist
[component_container_isolated-7] [WARN] [1732157521.241269141] [amcl]: AMCL cannot publish a pose or update the transform. Please set the initial pose...
[component_container_isolated-7] [INFO] [1732157521.539235593] [global_costmap.global_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist
[component_container_isolated-7] [INFO] [1732157522.039177701] [global_costmap.global_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist
[component_container_isolated-7] [ERROR] [1732157522.039220781] [global_costmap.global_costmap]: Failed to activate global_costmap because transform from base_link to map did not become available before timeout
[component_container_isolated-7] [ERROR] [1732157522.039616016] [lifecycle_manager_navigation]: Failed to change state for node: planner_server
[component_container_isolated-7] [ERROR] [1732157522.039642736] [lifecycle_manager_navigation]: Failed to bring up all requested nodes. Aborting bringup.
[component_container_isolated-7] [WARN] [1732157523.448310789] [amcl]: AMCL cannot publish a pose or update the transform. Please set the initial pose...
[component_container_isolated-7] [WARN] [1732157525.655386476] [amcl]: AMCL cannot publish a pose or update the transform. Please set the initial pose...
[component_container_isolated-7] [WARN] [1732157527.863406841] [amcl]: AMCL cannot publish a pose or update the transform. Please set the initial pose...
[component_container_isolated-7] [WARN] [1732157529.889380400] [amcl]: AMCL cannot publish a pose or update the transform. Please set the initial pose...
...

After setting initial pose

rviz2

[rviz2-1] [INFO] [1732157634.089209402] [rviz2]: Trying to create a map of size 60 x 60 using 1 swatches
[rviz2-1] [INFO] [1732157634.215492729] [rviz]: Message Filter dropping message: frame 'base_scan' at time 170.601 for reason 'discarding message because the queue is full'
[rviz2-1] [INFO] [1732157637.845873534] [rviz]: Message Filter dropping message: frame 'odom' at time 167.103 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
[rviz2-1] [INFO] [1732157638.461822758] [rviz]: Message Filter dropping message: frame 'odom' at time 167.700 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
[rviz2-1] [INFO] [1732157639.039901190] [rviz]: Message Filter dropping message: frame 'odom' at time 168.297 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
[rviz2-1] [INFO] [1732157639.654688866] [rviz]: Message Filter dropping message: frame 'odom' at time 168.891 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
[rviz2-1] [INFO] [1732157640.270689796] [rviz]: Message Filter dropping message: frame 'odom' at time 169.491 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
[rviz2-1] [INFO] [1732157640.848766035] [rviz]: Message Filter dropping message: frame 'odom' at time 170.088 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
[rviz2-1] [INFO] [1732157641.463834163] [rviz]: Message Filter dropping message: frame 'odom' at time 170.685 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
[rviz2-1] [INFO] [1732157641.463898701] [rviz]: Message Filter dropping message: frame 'odom' at time 170.676 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
[rviz2-1] [INFO] [1732157641.650282317] [rviz]: Message Filter dropping message: frame 'odom' at time 170.856 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
[rviz2-1] [INFO] [1732157641.861587523] [rviz]: Message Filter dropping message: frame 'odom' at time 171.072 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
[rviz2-1] [INFO] [1732157642.078540457] [rviz]: Message Filter dropping message: frame 'odom' at time 171.282 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
[rviz2-1] [INFO] [1732157642.078587787] [rviz]: Message Filter dropping message: frame 'odom' at time 171.252 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
[rviz2-1] [INFO] [1732157642.260057755] [rviz]: Message Filter dropping message: frame 'odom' at time 171.468 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
[rviz2-1] [INFO] [1732157642.476552745] [rviz]: Message Filter dropping message: frame 'base_scan' at time 170.802 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
[rviz2-1] [INFO] [1732157642.476777269] [rviz]: Message Filter dropping message: frame 'odom' at time 171.648 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
[rviz2-1] [INFO] [1732157642.657415646] [rviz]: Message Filter dropping message: frame 'base_scan' at time 171.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
[rviz2-1] [INFO] [1732157642.657579281] [rviz]: Message Filter dropping message: frame 'odom' at time 171.879 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
[rviz2-1] [INFO] [1732157642.657605274] [rviz]: Message Filter dropping message: frame 'odom' at time 171.864 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
[rviz2-1] [INFO] [1732157642.874436664] [rviz]: Message Filter dropping message: frame 'base_scan' at time 171.201 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
[rviz2-1] [INFO] [1732157642.874667955] [rviz]: Message Filter dropping message: frame 'odom' at time 172.044 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
[rviz2-1] [INFO] [1732157643.055487935] [rviz]: Message Filter dropping message: frame 'base_scan' at time 171.402 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
[rviz2-1] [INFO] [1732157643.055800444] [rviz]: Message Filter dropping message: frame 'odom' at time 172.260 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
[rviz2-1] [INFO] [1732157643.273418013] [rviz]: Message Filter dropping message: frame 'base_scan' at time 171.600 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
[rviz2-1] [INFO] [1732157643.490475780] [rviz]: Message Filter dropping message: frame 'base_scan' at time 171.801 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
[rviz2-1] [INFO] [1732157643.671332619] [rviz]: Message Filter dropping message: frame 'base_scan' at time 172.002 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
[rviz2-1] [INFO] [1732157643.888415774] [rviz]: Message Filter dropping message: frame 'base_scan' at time 172.200 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
[rviz2-1] [INFO] [1732157644.069488395] [rviz]: Message Filter dropping message: frame 'base_scan' at time 172.401 for reason 'the timestamp on the message is earlier than all the data in the transform cache'

nav2

[component_container_isolated-7] [WARN] [1732157625.577311352] [amcl]: AMCL cannot publish a pose or update the transform. Please set the initial pose...

[component_container_isolated-7] [WARN] [1732157627.603494124] [amcl]: AMCL cannot publish a pose or update the transform. Please set the initial pose...
[component_container_isolated-7] [WARN] [1732157629.811363939] [amcl]: AMCL cannot publish a pose or update the transform. Please set the initial pose...
[component_container_isolated-7] [WARN] [1732157632.019343648] [amcl]: AMCL cannot publish a pose or update the transform. Please set the initial pose...
[component_container_isolated-7] [INFO] [1732157632.866957314] [amcl]: initialPoseReceived
[component_container_isolated-7] [WARN] [1732157632.867070813] [amcl]: Failed to transform initial pose in time (Lookup would require extrapolation into the future.  Requested time 171.267000 but the latest data is at time 171.252000, when looking up transform from frame [base_footprint] to frame [odom])
[component_container_isolated-7] [INFO] [1732157632.867106849] [amcl]: Setting pose (171.267000): -1.846 -0.605 -0.053

What happens if you remove each of the Nav2 panel plugins, one at a time, and launch between them? Anyone in in particular have the issue removed if not present (again, I expect to be related to the initialization - so I would think the main Nav2 panel if any).

OK, I think the issue might come from this in rviz. It works perfectly if I remove Selector in rviz file.

  - Class: nav2_rviz_plugins/Selector
    Name: Selector

Here is the rviz file that works on my side.
available_rviz.zip

@evshary
Copy link
Author

evshary commented Nov 25, 2024

Hi @SteveMacenski I'm not sure if you think this is a bug or not. Let me know if I should reopen the issue. Thank you

@SteveMacenski SteveMacenski changed the title Unable to set goal pose if we run rviz2 later than navitation2 [nav2_rviz_plugins/Selector] Unable to set goal pose if we run rviz2 later Nov 25, 2024
@SteveMacenski
Copy link
Member

I agree this is a bug -- CC @padhupradheep as the author of this newer panel. I suspect it has to do with https://github.com/ros-navigation/navigation2/blob/main/nav2_rviz_plugins/src/selector.cpp#L154-L168

@SteveMacenski SteveMacenski reopened this Nov 25, 2024
@SteveMacenski SteveMacenski added the bug Something isn't working label Nov 25, 2024
@padhupradheep
Copy link
Member

Thanks for reporting @evshary

I'll take a look at it soon.

@SteveMacenski
Copy link
Member

SteveMacenski commented Nov 25, 2024

I know you've got a few things on your queue @padhupradheep for Nav2 -- I'd put this on the bottom, the other 2 are higher priority. This is something we should fix for sure, but isn't functionally breaking Nav2 uses in deployed applications, so I would deprioritize this over those

If @evshary or another user wants to jump in to debug further, I'm sure we'd appreciate it!

@padhupradheep
Copy link
Member

padhupradheep commented Nov 26, 2024

Did a very quick dig, seems to be that for some reason, when

client_node_, server_failed_, "planner_server", "planner_plugins", planner_);
the plugin loader is called here in the above line and when the get_parameters function is called here:
auto parameters = parameter_client->get_parameters({plugin_type});
for some reason we have to wait few minutes for the function to return the parameters. This never occurred here
client_node_, server_failed_, "controller_server", "controller_plugins", controller_);

This is weird to see the SyncParametersClient taking that much time to return the planner_plugins. I'm not sure if this issue is also there in Iron. Need to check it once.

@SteveMacenski
Copy link
Member

That is odd, considering that the controller is actually activated before the planner https://github.com/ros-navigation/navigation2/blob/main/nav2_bringup/launch/navigation_launch.py#L44

Might be better to have it do this update in a separate thread so that it doesn't block bringup - then update its values once you have them. We could also do an async param get and after some timeout retry once so that if there's some discovery issues we try again once things have calmed down

@padhupradheep
Copy link
Member

Makes sense to me. @evshary you want to give a swing at it?

@evshary
Copy link
Author

evshary commented Nov 27, 2024

Hi @padhupradheep Thanks for looking into it. I could give it a try, but I've been blocked with other issues currently. Therefore, don't wait for me if this is urgent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants