[Closed] ROSbot 2 PRO tutorials, mapping and navigation strange behavior

I have recently had to rebuild my ROSbot 2.0 Pro image with the Melodic image provided by Husarion. Upon revisiting the tutorials, they seem to be in a state of disrepair. Attempting to use the Gazebo model provided at:
github repo rosbot_description
The instructions assume kinetic is installed, while the default image for the robot is melodic.

Regardless, I followed the instructions on the github repo to clone and build the software on my machine with ubuntu 18 and melodic installed. to which I recieve the following error:
RLException: Unable to contact my own server at [http://VMlaptop:38321/].

Where VMlaptop is my husarnet id for my laptop.

I’ve also noticed many of the tutorials don’t seem to work properly. I’ve even cloned and built the solutions in the following repo:
github repo tutorial_pkg

And I’m still having issues getting the robot to run the launch files proper as it had prior to my recent rebuild.

My question is, has anyone actually run through the tutorials from start to end using each robot?

It seems there is a decent amount of github activity on ROS2 docker packages, but there’s not a whole lot explaining how to build them or use them. Where do I find how to create and use the Docker containers? If the intent is to move to ROS2, where are the tutorials for ROS2?

I’m finding it incredibly hard to learn anything from the tutorials at this point, which was the whole purpose of purchasing this robot.

Please help.

Thanks!

I have had good results with the prebuilt rosbot docker containers for ROS2 humble. I did have to reflash the CORE2 board before the ROS2 docker containers worked.

Check this repo GitHub - husarion/rosbot_ros: ROS packages for ROSbot 2, 2R and 2 PRO

@hetzerrr thanks for the quick response!

So do I understand it correctly that the docker contains an install of ROS 2 humble? While this is inside of a container, shouldn’t I still use this container on a PC with the appropriate Ubuntu distribution?

Would you mind pointing me to the correct installation instructions to install the correct image to the robot to match this simulation?

Thanks in advance for your help!

The instructions are at Operating System Reinstallation | Husarion, selecting the Rosbot Pro.

The docker containers include all that is needed, including ROS humble, so a native install on the SBC is not necessary. Yes, the containers are run from the SBC with Ubuntu installed.

Additional info regarding the docker images is at Docker Images For Husarion's Robots | Husarion. The github repo at GitHub - husarion/rosbot-docker: Docker images for ROSbot 2 platform, ros2 branch used to contain a set of very useful set of docker compose files, but these were deleted with a recent commit. I will report this on a separate thread

This has been my experience as well, just with the ROSbot 2.0 base model :frowning:

@hetzerrr
Do you know of a set of instructions that are a linear, “start to finish” guide for a non-seasoned ROS/Docker/Github developer to get the the robot running and to learn how to actually use ROS?

The links you had attached do not really explain what exactly needs to be done in a manner that a complete noob could understand.

Thanks again for your help!

After further exploration into the “quick start” guide which ultimately leads to the rosbot-docker github repo, I find instructions that are riddled with mistakes. It never actually instructs to clone the repo on the robot. After finally getting the dockers running on both laptop and my ROSBOT 2.0 Pro (running the Ubuntu 18/Melodic image provided), I get tons of errors in RVIz

  1. No Map Received
  2. in RobotModel: No transform from [every fram] to [map]

While this may sound simple for a ROS expert, this is pretty awful for someone learning like myself.

Is there any step by step process that actually works for the ROSBOT 2.0 Pro?

Any help would be greatly appreciated, otherwise this robot may also get put up for sale

Hello moyboyufl,

first, try running the examples from the following repositories on your ROSbot 2 PRO:

Remember to properly set the .env file.

Before running the examples (in the case of ROSbot 2 PRO), I suggest you run the following two commands in the ROSbot’s terminal to ensure that the SERIAL_PORT environment variable is set correctly:

export SERIAL_PORT=/dev/ttyS4

echo "export SERIAL_PORT=/dev/ttyS4" >> ~/.bashrc

In case of further problems, let me know.

Best regards
Jan Brzyk

Thank you for a response.

What Ubuntu/ROS image do I need to install onto the robot/ dev laptop?

What do you mean by properly setting my .env file? The first repo has no mention of .env file settings. What should I be properly setting?

For the serial port environment variable, where is this information located in the tutorials?

What other dependencies need to be installed prior to running the mentioned tutorials. Given that this is intended to be an educational product to learn how to use ROS, I feel that there should a set of cohesive instructions, from start to finish.

The quick start guide provides instructions to multiple installation images, so which image should be installed prior to following the instructions in the mentioned repositories?

I’ve already spent far too many hours fumbling around with various combinations of system configurations, since the documentation is very confusing to me.

Given my consistent state of confusion with the tutorials, should I assume that the ROSbot products are intended for developers with a more solid understanding of ROS and docker? I’m more than willing to be told that I’m not skilled enough to use your tutorials, but I’d at least like to know that up front, and what type of prerequisites are needed to utilize your product

Thank you for your patience, and I look forward to your clarification.

@moyboyufl

For ROSbot, there is no imposed system image. You can use the system image given by default or flash new image from our ROSbot 2 PRO manual. For PC/laptop, it is recommended to have at least Ubuntu 20.04, but older (for example 18.04) should work. ROS version installed on ROSbot or computer doesn’t matter since you launch these three examples I’ve sent above, because of Docker utilization. Make sure you have Docker installed on your PC/laptop.

Yes, of course, when there is no .env you don’t have to set .env file. If it exists, the .env file is well described in a README of a given repository.

For the SERIAL_PORT environment variable, you can see the info here.

There is no need to install any dependencies as it is exactly the power of the Docker which takes care about all the dependencies.

As mentioned above, examples work with all the system images.

Let me know in case of any other problems.

Best regards
Jan Brzyk

@JanBrzyk
I’ve successfully gotten all 3 of the templates you listed to run. I will say that I am very disappointed in the performance of the mapping and navigation, as compared to the performance of the tutorials a year ago, as well as the built in demo in the quick start.

For reference, I’m using an i7 laptop with ubuntu 18 running natively and a logitech F710 gamepad connected over usb.

When mapping, If I don’t move super slowly, and stop for a few second after each movement, the SLAM loses localization, and never catches back up. Sometimes when I think I’ve gotten a good map, then stop the robot, the map keeps moving, even though the odometry and lidar show no movement.

I’ve even mapped the small area of my office. After finally being able to get a successful map, when I navigate, the path plan is nonsensical. It keeps trying to go in circles when it can more easily move in a straight line.

During both mapping and navigation, I frequently get errors in Rviz and the docker terminals, and I lose the map in both mapping and navigation, or I lose gamepad or keyboard controll in the mapping (I’ve tried both)

How do I find the source code for what you built into the docker? The repo’s have no code in them. When I look in the yaml files, it seems to point to a husarion Docker repo.

Has the product team actually tried running a ROSbot 2.0 PRo out of box through the tutorials on the website? They don’t work.

Has the product team actually run the robot through the 3 templates provided to me? They execute, but to say they work would be very optimistic.

Is there a way I can get a hold of the website tutorials and built in demo from a year ago? They did actually work decently. Far better than what has been suggested to me.

I’m currently enrolled in the constructsim as well, but they seem to be using the Rosbot 2R. Are there specific courses I can use so I can get some uses out of this robot?

Can I exchange my robot for the 2R model?

Are my expectations for the usefulness of this $3K device too much? I’m sorry for getting so upset, but this robot has given me nothing but frustration since the website changed the tutorials and images.

@moyboyufl
The problems you described look very strange, because naturally all our examples and tutorials are properly tested on all supported versions of robots. In your situation (both rosbot-mapping and rosbot-navigation) I suggest changing the RMW_IMPLEMENTATION variable to rmw_cyclonedds_cpp in the .env configuration file. Just comment out the current value and uncomment the value I suggested.
Additionally, just in case, execute the following command:

export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp

Let me know if it gave positive results.

Best regards
Jan Brzyk

@JanBrzyk
Sorry for the late reply. I’ve finally been able to get back to working on this. Making your suggested change does improve the functionality. The rosbot-mapping seems to work pretty flawlessly, so thank you very much.

The rosbot-navigation, however is still giving me trouble. The error messages are definitely different than what I encountered before, but the behavior is the same, where the robot goes in circles when the path that is planned is very simple with no obstacles. Here are the errors I am receiving:

rosbot-navigation-navigation-1 | [controller_server-1] [INFO] [1675975585.815366088] [controller_server]: Passing new path to controller.
rosbot-navigation-navigation-1 | [controller_server-1] [WARN] [1675975585.948299483] [controller_server]: Control loop missed its desired rate of 10.0000Hz
rosbot-navigation-navigation-1 | [controller_server-1] [INFO] [1675975586.917844109] [controller_server]: Passing new path to controller.
rosbot-navigation-navigation-1 | [controller_server-1] [WARN] [1675975587.056291816] [controller_server]: Control loop missed its desired rate of 10.0000Hz
rosbot-navigation-navigation-1 | [controller_server-1] [INFO] [1675975587.916938858] [controller_server]: Passing new path to controller.
rosbot-navigation-navigation-1 | [controller_server-1] [WARN] [1675975588.058382665] [controller_server]: Control loop missed its desired rate of 10.0000Hz
rosbot-navigation-navigation-1 | [controller_server-1] [INFO] [1675975588.916295795] [controller_server]: Passing new path to controller.
rosbot-navigation-navigation-1 | [controller_server-1] [WARN] [1675975589.040054990] [controller_server]: Control loop missed its desired rate of 10.0000Hz
rosbot-navigation-navigation-1 | [controller_server-1] [INFO] [1675975590.025607490] [controller_server]: Passing new path to controller.
rosbot-navigation-navigation-1 | [controller_server-1] [WARN] [1675975590.157376585] [controller_server]: Control loop missed its desired rate of 10.0000Hz
rosbot-navigation-navigation-1 | [controller_server-1] [INFO] [1675975591.015523028] [controller_server]: Passing new path to controller.
rosbot-navigation-navigation-1 | [controller_server-1] [WARN] [1675975591.165228597] [controller_server]: Control loop missed its desired rate of 10.0000Hz
rosbot-navigation-navigation-1 | [controller_server-1] [ERROR] [1675975591.421202100] [controller_server]: Failed to make progress
rosbot-navigation-navigation-1 | [controller_server-1] [WARN] [1675975591.422061425] [controller_server]: [follow_path] [ActionServer] Aborting handle.
rosbot-navigation-navigation-1 | [behavior_server-4] [INFO] [1675975591.444231824] [behavior_server]: Running backup
rosbot-navigation-navigation-1 | [behavior_server-4] [INFO] [1675975598.247183227] [behavior_server]: backup completed successfully
rosbot-navigation-navigation-1 | [planner_server-3] [WARN] [1675975598.276666463] [planner_server]: GridBased: failed to create plan, invalid use: Starting point in lethal space! Cannot create feasible plan…
rosbot-navigation-navigation-1 | [planner_server-3] [WARN] [1675975598.276952263] [planner_server]: Planning algorithm GridBased failed to generate a valid path to (0.00, 1.23)
rosbot-navigation-navigation-1 | [planner_server-3] [WARN] [1675975598.277061276] [planner_server]: [compute_path_to_pose] [ActionServer] Aborting handle.
rosbot-navigation-navigation-1 | [planner_server-3] [INFO] [1675975598.293246488] [global_costmap.global_costmap]: Received request to clear entirely the global_costmap
rosbot-navigation-navigation-1 | [planner_server-3] [WARN] [1675975598.671353398] [planner_server]: GridBased: failed to create plan, invalid use: Starting point in lethal space! Cannot create feasible plan…
rosbot-navigation-navigation-1 | [planner_server-3] [WARN] [1675975598.671645398] [planner_server]: Planning algorithm GridBased failed to generate a valid path to (0.00, 1.23)
rosbot-navigation-navigation-1 | [planner_server-3] [WARN] [1675975598.671752786] [planner_server]: [compute_path_to_pose] [ActionServer] Aborting handle.
rosbot-navigation-navigation-1 | [controller_server-1] [INFO] [1675975598.693742285] [local_costmap.local_costmap]: Received request to clear entirely the local_costmap
rosbot-navigation-navigation-1 | [planner_server-3] [INFO] [1675975598.696088822] [global_costmap.global_costmap]: Received request to clear entirely the global_costmap
rosbot-navigation-navigation-1 | [planner_server-3] [WARN] [1675975599.666320173] [planner_server]: GridBased: failed to create plan, invalid use: Starting point in lethal space! Cannot create feasible plan…
rosbot-navigation-navigation-1 | [planner_server-3] [WARN] [1675975599.666707348] [planner_server]: Planning algorithm GridBased failed to generate a valid path to (0.00, 1.23)
rosbot-navigation-navigation-1 | [planner_server-3] [WARN] [1675975599.666818935] [planner_server]: [compute_path_to_pose] [ActionServer] Aborting handle.
rosbot-navigation-navigation-1 | [planner_server-3] [INFO] [1675975599.683063872] [global_costmap.global_costmap]: Received request to clear entirely the global_costmap
rosbot-navigation-navigation-1 | [planner_server-3] [WARN] [1675975600.668924434] [planner_server]: GridBased: failed to create plan, invalid use: Starting point in lethal space! Cannot create feasible plan…
rosbot-navigation-navigation-1 | [planner_server-3] [WARN] [1675975600.669738572] [planner_server]: Planning algorithm GridBased failed to generate a valid path to (0.00, 1.23)
rosbot-navigation-navigation-1 | [planner_server-3] [WARN] [1675975600.669890472] [planner_server]: [compute_path_to_pose] [ActionServer] Aborting handle.
rosbot-navigation-navigation-1 | [bt_navigator-5] [ERROR] [1675975600.682150621] [bt_navigator]: Goal failed
rosbot-navigation-navigation-1 | [bt_navigator-5] [WARN] [1675975600.682406346] [bt_navigator]: [navigate_to_pose] [ActionServer] Aborting handle.

How to I go about fixing this?

Also, where can I find the source code for the nodes that are running in the rosbot-mapping and rosbot-navigation tutorials? Or are these just running nodes that are installed with the ROS install?

Thanks

Hello @moyboyufl

The behavior of the robot during the rosbot-navigation example you described, i.e. spinning around instead of navigating to a destination, is a symptom of an external DDS configuration issue.

Pay attention to the .env file containing the configuration of environment variables, and then by commenting and uncommenting the appropriate lines change RMW_IMPLEMENTATION to the other value. This should help in your case.

Best regards
Jan Brzyk

Hello @JanBrzyk ,
So when I change the RMW_IMPLEMENTATION on both my laptop and the ROSBOT, I get the following errors:

1.changing both to RMW_IMPLEMENTATION=rmw_fastrtps_cpp, I get the same behavior I did originally described in this thread. The robot suffers from random spinning very early in a path plan
a.on Laptop I get these errors:
rosbot-navigation-rviz-1 | [ERROR] [1677704539.133760582] [rviz2]: Lookup would require extrapolation into the future. Requested time 1677704536.296653 but the latest data is at time 1677704536.286789, when looking up transform from frame [laser] to frame [map]
rosbot-navigation-rviz-1 | [ERROR] [1677704539.272623769] [rviz2]: Lookup would require extrapolation into the future. Requested time 1677704536.459757 but the latest data is at time 1677704536.386864, when looking up transform from frame [laser] to frame [map]
b.on robot I get these errors:
rosbot-navigation-navigation-1 | [controller_server-1] [INFO] [1677704570.535594067] [controller_server]: Passing new path to controller.
rosbot-navigation-navigation-1 | [controller_server-1] [WARN] [1677704570.601460177] [controller_server]: Control loop missed its desired rate of 10.0000Hz
rosbot-navigation-navigation-1 | [controller_server-1] [WARN] [1677704570.657038825] [controller_server]: Control loop missed its desired rate of 10.0000Hz

2.When I set RMW_IMPLEMENTATION=rmw_cyclonedds_cpp I get the following errors. The robot suffers from random spinning further down a path plan, and the localization started to drift from reality
a. on the laptop
rosbot-navigation-rviz-1 | [ERROR] [1677705404.004968820] [rviz2]: Lookup would require extrapolation into the future. Requested time 1677705401.192822 but the latest data is at time 1677705401.173338, when looking up transform from frame [laser] to frame [map]
rosbot-navigation-rviz-1 | [ERROR] [1677705404.130138019] [rviz2]: Lookup would require extrapolation into the future. Requested time 1677705401.356759 but the latest data is at time 1677705401.273332, when looking up transform from frame [laser] to frame [map]
rosbot-navigation-rviz-1 | [ERROR] [1677705404.192907925] [rviz2]: Lookup would require extrapolation into the future. Requested time 1677705401.390359 but the latest data is at time 1677705401.373322, when looking up transform from frame [laser] to frame [map]

b.on the ROSBOT
rosbot-navigation-navigation-1 | [behavior_server-4] [WARN] [1677705441.029573548] [behavior_server]: Collision Ahead - Exiting DriveOnHeading
rosbot-navigation-navigation-1 | [behavior_server-4] [WARN] [1677705441.029677298] [behavior_server]: backup failed
rosbot-navigation-navigation-1 | [behavior_server-4] [WARN] [1677705441.029980298] [behavior_server]: [backup] [ActionServer] Aborting handle.
rosbot-navigation-navigation-1 | [controller_server-1] [INFO] [1677705441.044300310] [local_costmap.local_costmap]: Received request to clear entirely the local_costmap
rosbot-navigation-navigation-1 | [planner_server-3] [INFO] [1677705441.045785872] [global_costmap.global_costmap]: Received request to clear entirely the global_costmap
rosbot-navigation-navigation-1 | [controller_server-1] [INFO] [1677705441.308464562] [controller_server]: Received a goal, begin computing control effort.
rosbot-navigation-navigation-1 | [controller_server-1] [INFO] [1677705442.409253545] [controller_server]: Passing new path to controller.
rosbot-navigation-navigation-1 | [controller_server-1] [INFO] [1677705443.509244141] [controller_server]: Passing new path to controller.
rosbot-navigation-navigation-1 | [controller_server-1] [WARN] [1677705443.656154060] [controller_se

I made sure to manually set the environmental variable on both machines prior to starting up the dockers too.

So I don’t believe it’s a simple matter of changing the RMW_IMPLEMENTATION in the .env like you suggest.

Any other potential causes for this?

Hello @moyboyufl and sorry for the delay.

The problems you describe may stem from an outdated ROS Melodic OS Image that is not supported and introduces the risk of backward compatibility bugs. Reliability and stability are ensured by two up-to-date system images to choose from, with native ROS 2 Foxy (recommended) and with native ROS Noetic. You can find the download and the flashing instructions at the link below. Remember that you will lose all data stored in your ROSbot 2 PRO’s memory when reflashing the system.

Then go through the Quick Start Guide again by following the steps for the appropriate system image (Foxy or Noetic).

The gamepad, mapping and navigation should now work without a problem.
Let me know if you get concrete results.

Best regards
Jan Brzyk

So I’ve updated the Rosbot using the ROS2 Foxy image, and I’m even booting my laptop into an Ubuntu 22 partition. I was able to successfully run through the quick start, the gamepad tutorial, and the mapping tutorial.

While mapping, I ran into identical issues as before when using the default fastrtps. When I switched to cyclonedds, I was able to map with decently low latency

After copying the saved maps to rosbot-navigation/maps/, and spinning up the navigation dockers on the laptop and robot, I’m unable to get the map to appear in Rviz now.

I tried “ros2 topic echo /map” and nothing was being shown.

I tried “ros2 topic info --verbose /map” and it shows there is 1 subscriber, rviz, but 0 publishers

When I do a “ros2 topic info /map_server” as expected, it’s not publishing to /map topic.

When I do a “docker ps” it looks like the rosbot-navigation-navigation-1 and rosbot-navigation-localization-1 containers are from the image husarion/navigation2:humble-22-12-07. I’m not sure what version I was using prior to changing the rosbot image, but I never had an issue with the map being loaded/displayed properly.

Any suggestions?

Thanks

@JanBrzyk , Sorry I forgot to tag you in my previous post above

Hello @moyboyufl

can you sand here, or in PM, or via mail (jan.brzyk@husarion.com) the logs from the ROSbot’s and PC’s terminals?

Best regards
Jan Brzyk

Good morning @JanBrzyk !

If I use the cyclone dds on both Rosbot and PC,

here is what I get on the Rosbot:
rosbot-navigation-navigation-1 | [planner_server-3] [INFO] [1679926533.483936515] [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
rosbot-navigation-navigation-1 | [planner_server-3] [INFO] [1679926533.983938658] [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
rosbot-navigation-navigation-1 | [planner_server-3] [INFO] [1679926534.483934127] [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
rosbot-navigation-navigation-1 | [planner_server-3] [INFO] [1679926534.983943045] [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
rosbot-navigation-navigation-1 | [planner_server-3] [INFO] [1679926535.483919614] [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
r

Here is what I get on the PC:
rosbot-navigation-rviz-1 | at line 93 in ./src/buffer_core.cpp
rosbot-navigation-rviz-1 | Warning: Invalid frame ID “map” passed to canTransform argument target_frame - frame does not exist
rosbot-navigation-rviz-1 | at line 93 in ./src/buffer_core.cpp
rosbot-navigation-rviz-1 | Warning: Invalid frame ID “map” passed to canTransform argument target_frame - frame does not exist
rosbot-navigation-rviz-1 | at line 93 in ./src/buffer_core.cpp
rosbot-navigation-rviz-1 | Warning: Invalid frame ID “map” passed to canTransform argument target_frame - frame does not exist
rosbot-navigation-rviz-1 | at line 93 in ./src/buffer_core.cpp

If I change to fastrtps on both ROSBOT and PC,
Rosbot shows:
rosbot-navigation-navigation-1 | [planner_server-3] [INFO] [1679927051.707893626] [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
rosbot-navigation-navigation-1 | [planner_server-3] [INFO] [1679927052.207870031] [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
rosbot-navigation-navigation-1 | [planner_server-3] [INFO] [1679927052.707843450] [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
r

PC shows:
rosbot-navigation-rviz-1 | at line 93 in ./src/buffer_core.cpp
rosbot-navigation-rviz-1 | Warning: Invalid frame ID “map” passed to canTransform argument target_frame - frame does not exist
rosbot-navigation-rviz-1 | at line 93 in ./src/buffer_core.cpp
rosbot-navigation-rviz-1 | Warning: Invalid frame ID “map” passed to canTransform argument target_frame - frame does not exist
rosbot-navigation-rviz-1 | at line 93 in ./src/buffer_core.cpp
rosbot-navigation-rviz-1 | Warning: Invalid frame ID “map” passed to canTransform argument target_frame - frame does not exist
rosbot-navigation-rviz-1 | at line 93 in ./src/buffer_core.cpp

So it appears that I have the same error regardless of which DDS implementation, so hopefully that means it’s unrelated to the DDS selection.

I confirmed that the maps folder is present in the rosbot-navigation folder on the PC,