project-aslan / Aslan

Open source self-driving software for low speed environments
Apache License 2.0
272 stars 69 forks source link

Problem with RVIZ[BUG] #25

Closed thiagodeborba closed 3 years ago

thiagodeborba commented 3 years ago

After loading the PointCloud Map and selecting the NDT Matching, when I open the RVIZ it opens this way. grafik And I can not see the generated map. How can I solve this?

EfimiaPanagiotaki-StreetDrone commented 3 years ago

First make sure the pcd is loaded at 100%. Then, when you open rviz, click on Add -> By topic and select /points_map -> PointCloud2. When you reach the step where you launch ndt matching as well, use the default rviz config file located at Aslan/src/aslan_tools/rviz/default.rviz.

thiagodeborba commented 3 years ago

You said : "When you launch ndt matching as well, use the default rviz config file located at Aslan/src/aslan_tools/rviz/default.rviz" How do I do that?

EfimiaPanagiotaki-StreetDrone commented 3 years ago

On rviz, click on File -> Open Config and choose the rviz configuration mentioned above

thiagodeborba commented 3 years ago

When I run this rviz config file, I cant see the vehicle and the reflections. It seems it is not connected to Aslan anymore. When I run RViz through the button rviz on the bottom it opens Rviz as the picture I sent and if I add "Add -> By topic and select /points_map -> PointCloud2." this way I can only see the reflections. But not the generated map. How to solve it. Because in the Tutorial, the guy just click on Rviz and it shows everything correctly. But this is not the reality.

EfimiaPanagiotaki-StreetDrone commented 3 years ago

I assume you are on the step where you are looking to extract the waypoints. In order to do that you need:

  1. A rosbag with recorded topic /points_raw, either from simulation data or the vehicle when driving it manually.
  2. A pcd extracted from this rosbag using ndt_mapping.

Now to extract the waypoints, step by step:

  1. Make sure you don't have anything selected on Aslan and that the simulation is not launched
  2. Select the rosbag on the tools tab. Click on play and then immediately pause to set the /use_sim_time to true
  3. Configuration tab -> Click TF
  4. Perception tab -> Choose your pcd file and wait until it loads to 100%
  5. Perception tab -> Click TF and then select Voxel Grid
  6. Perception tab -> Select NDT Matching
  7. Open rviz and load the default.rviz file. You should not be seeing anything since the rosbag is not running!
  8. Unpause the rosbag. Now you should be seeing the /points_raw from the rosbag and the /points_map from the pcd on rviz. Pause the rosbag again so you can launch the waypoints saver on the next step.
  9. Planning tab -> Click on config next to Waypoints Saver and choose your preferred file path for the waypoints to be saved.
  10. To visualize the waypoints on Rviz: Go to Add -> By Topic -> MarkerArray

Hope this helps!

parth3153 commented 3 years ago

Hello there, I am having the same issue, when I un-pause the rosbag I am not able to see points_raw from the rosbag, are there any steps in between? Could you please elaborate?

EfimiaPanagiotaki-StreetDrone commented 3 years ago

Can you try the steps again using the rosbag and pcd provided in the project? If these work, can you confirm that when extracting the pcd and the rosbag, you had TF (Configuration tab) clicked?

thiagodeborba commented 3 years ago

I am having a lot of problems to match the position. My simulation starts with the Twizy in front of the garage door. Then the map was generated. When I load the map again in a new simulation, with the vehicle in Gazebo in the position as the previus simulation, The Twizy is in a completely different Position in Rviz. grafik How can I solve it? 2D pose estimate does not do anything.

EfimiaPanagiotaki-StreetDrone commented 3 years ago

2D pose estimate is what we are using to move the robot around in rviz, on the localization step. Make sure you click on the car and drag it to the position you want. The world you are using doesn't have enough features by the looks of it, so the extracted map is not very good. The world you are using is a low-cost world for the user to familiarize with the robot and the environment. But it will probably be challenging for mapping and localization. We can try extracting a map for you and record the steps, but it might not be very useful either. Please use Default Park instead.

parth3153 commented 3 years ago

Hello there, I am facing problems loading the waypoints path, when I ran the file, the path is not loading up, and instead the vehicle is moving, the path is not visible throughout the entire rosbag loading up.

EfimiaPanagiotaki-StreetDrone commented 3 years ago

Hi @parth3153, Please give me more information on the following:

thiagodeborba commented 3 years ago

I saved already more than 10 times the same path using WayPoints saver. But when I load it, it is a completely different Path. How can I solve this?

EfimiaPanagiotaki-StreetDrone commented 3 years ago

This issue was solved after our chat yesterday: Ndt needs to have enough points to localise with, else it will not work. Waypoints saver will not produce the correct waypoints if localization has an error. Ndt is a pointcloud scan matching technique, so in order to successfully match the pointclouds, it needs to have enough points. Do not try ndt matching on open space areas, as it will not work. This will also be the case when you try it on the car. Make sure that you are on an area with enough features (walls, trees, cars etc).

I will open a feature request for improving/debugging the worlds in Gazebo.

Links to #28 #29