usdot-fhwa-stol / carma-platform

CARMA Platform is built on robot operating system (ROS) and utilizes open source software (OSS) that enables Cooperative Driving Automation (CDA) features to allow Automated Driving Systems to interact and cooperate with infrastructure and other vehicles through communication. Doxygen Source Code Documentation :
https://usdot-fhwa-stol.github.io/documentation/carma-platform/
403 stars 124 forks source link

rviz2 configuration port #2425

Closed MishkaMN closed 3 months ago

MishkaMN commented 3 months ago

PR Details

Description

This PR adds rviz2 configuration port of existing carma_default.rviz. It also removed unused and outdated topics. No other installation is needed, since rviz2 is shipped and installed with ros-foxy-desktop and is in carma-base already. Result: image

NOTE1: Currently all vehicles and simulation PCs are still in ros-noetic on the host machines. So this configuration can only be used inside docker container (which I confirmed acceptable with @JonSmet). Therefore, typical usage will look like:

carma exec "source /opt/carma/install_ros2/setup.bash && rviz2 -d /opt/carma/install_ros2/carma/share/carma/rviz/carma_default_ros2.rviz"

If the platform_ros2 container is running on a specific ip (e.g. simulation PCs) , /usr/bin/carma should be edited to match the ip (e.g. --network=host to --network=192.168.88.25) and then above cmd will work.

NOTE2: When loading point cloud map on ROS1 rviz (even when started inside the docker container as such above), the fps stays stable at 31fps. However, on rviz2, it comes down to 18-24 fps when static and zoomed in around the vehicle. And down to 6fps when the vehicle is moving (down to 6fps if zoomed out while static and the whole map is rendered on the view). Simulation PCs still work great at 31fps with PCL map loaded due to its fast processor/GPU.

I investigated this a bit more, and tried applying this potential fix that is implemented for a related bug by building rviz2 from source, but it didn't help. I didn't put too much effort in making it more stable since 1) we will upgrade to humble anyways and 2) we have workaround of using ROS1 rviz if needed, and 3) 6-8fps is not great, but still doable. We can actually just turn off PCD and Lidar while carma is running which bumps the fps to 15+. This is because those are only needed during initialization at the moment.

Related GitHub Issue

NA

Related Jira Key

https://usdot-carma.atlassian.net/browse/CAR-6061

Motivation and Context

ROS2 migration from ROS1.

How Has This Been Tested?

Sim PC and White Fusion

Types of changes

Checklist:

sonarcloud[bot] commented 3 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

MishkaMN commented 3 months ago

Created this issue: https://github.com/usdot-fhwa-stol/carma-platform/issues/2427