Real Robot Nav2 issue

I have completed my Real Robot Project in simulation its working fine, when i started actual robot i had couple of errors…

1st thing is ROS bridge
when i start using below commands

iam getting like this

when i checked for ros2 topic list
i got only /parameter_events and /rosout

then after spending much time searching for the solution, i found this
image

now iam getting all the topics
image

but when I launch my localization node and rviz2 I cannot see the scan data and robot description

then I came to know that in the new version of Rosject no need to start Bridge (however my rosject is an updated version but still for me its showing to launch Ros Bridge in a notebook)

after that i didnot launch bridge, i directly launched my localization node and rviz2 but i cannot see any scan data and robot description in rviz

Hi @AshishVarma, yes, the robot does not need the ros1_bridge anymore. Are you sure you have the latest version? https://app.theconstructsim.com/l/3dcfaa9d/ has no bridge instructions.

Launching a second bridge was probably the reason why you couldn’t see topics after that, since it interfered with the one already launched in the robot.

when i opened your link i got the same previous rosject which iam using, in that i can see the bridge instructions

and also catkin_ws to load launch file of params

I believe the reason why you keep seeing those instructions is because you have not deleted the out of date rosject (make sure to download your progress before). Since the sharing link is the same, it still redirects you to that one.

If you want the updated version, you must delete the current one you have.

It’s the same rosject, just without those instructions. You can also remove it yourself from the out of date one.

Yeah i did’not delete old rosject, but even though i did not run bridge, i am getting same error… see this

and after that if i launch my localization node iam getting like this

and when i launch rviz2 iam getting this warning

and my rviz not showing any data (scan, robot model, even if i give pose its not showing paricles) except loaded map from map_server.

can some one took into this…
thanks.

edit:
tf tree for real robot

Hi Ashish,
I have checked the Turtlebot 3 and found that the TF tree is correct in ROS 1 as you can see in this image:

However, when we connect to the robot with ROS 2, the TF tree looks broken, like this:

The reason is that there is a problem with the tf_static transforms which are not properly published in ROS 2.

We are working on solving this problem right now, and we will let you know when ready for new testing

Sure, thanks for the response.

Hi Ashish,

Happy to tell you that the /tf_static issue is solved. Here you can see the TF tree in ROS 2 with the appropriate frames:


Please try it out and let me know if everything works fine with you.

1 Like

Sure, ill try and let you know the status.

Perfect, now iam getting correct tf tree, and iam able to perform navigation too.
There are couple of errors iam not able to figure out.

  1. I cannot visualize my robot model in rviz.

  2. I cannot visualize my costmaps.

error in rviz

edit:

costmaps

global

global_costmap:
  global_costmap:
    ros__parameters:
      update_frequency: 1.0
      publish_frequency: 1.0
      global_frame: map
      robot_base_frame: base_link
      use_sim_time: True
      robot_radius: 0.08
      # robot_radius: 0.15
      resolution: 0.05
      track_unknown_space: true
      plugins: ["static_layer", "obstacle_layer", "inflation_layer"]
      static_layer:
        plugin: "nav2_costmap_2d::StaticLayer"
        map_subscribe_transient_local: True
      obstacle_layer:
        plugin: "nav2_costmap_2d::ObstacleLayer"
        enabled: True
        observation_sources: scan
        scan:
          topic: /scan
          max_obstacle_height: 2.0
          clearing: True
          marking: True
          data_type: "LaserScan"
          raytrace_max_range: 3.0
          raytrace_min_range: 0.0
          obstacle_max_range: 2.5
          obstacle_min_range: 0.0
      inflation_layer:
        plugin: "nav2_costmap_2d::InflationLayer"
        cost_scaling_factor: 3.0
        # inflation_radius: 0.35
        inflation_radius: 0.15
      always_send_full_costmap: True

local


local_costmap:
  local_costmap:
    ros__parameters:
      update_frequency: 5.0
      publish_frequency: 2.0
      global_frame: odom
      robot_base_frame: base_link
      use_sim_time: True
      rolling_window: true
      width: 1
      height: 1
      resolution: 0.05
      # robot_radius: 0.15
      robot_radius: 0.08
      plugins: ["voxel_layer", "inflation_layer"]
      inflation_layer:
        plugin: "nav2_costmap_2d::InflationLayer"
        cost_scaling_factor: 3.0
        # inflation_radius: 0.35
        inflation_radius: 0.15
      voxel_layer:
        plugin: "nav2_costmap_2d::VoxelLayer"
        enabled: True
        publish_voxel_map: True
        origin_z: 0.0
        z_resolution: 0.05
        z_voxels: 16
        max_obstacle_height: 2.0
        mark_threshold: 0
        observation_sources: scan
        scan:
          topic: /scan
          max_obstacle_height: 2.0
          clearing: True
          marking: True
          data_type: "LaserScan"
          raytrace_max_range: 3.0
          raytrace_min_range: 0.0
          obstacle_max_range: 2.5
          obstacle_min_range: 0.0
      static_layer:
        map_subscribe_transient_local: True
      always_send_full_costmap: True
      

I’m glad you were able to successfully navigate.

  1. You are right. I don’t know if the robot model is actually published and transferred succesfully over the internet. I will look into this for further improvement.
  2. This is an visualization issue that happens in our remote connections unfortunately. I have not been able to decipher why they can’t be visualized. However, just know that the costmaps are there. Otherwise, you would not be able to navigate.
  3. The error in rviz is again because of its inability to catch all of the transforms from base_scan to map. This does not mean there is an error in your code or the system. Its just performance issues from rviz

Thanks for letting me know, i was worried about that.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.