uos / radarays_gazebo_plugins

Rotating FMCW Radar Simulation in Gazebo
BSD 3-Clause "New" or "Revised" License
12 stars 3 forks source link

Visualization of Radar Data in Rviz #2

Closed Grossmeister5 closed 5 months ago

Grossmeister5 commented 6 months ago

Hello,

I am trying to run the provided example (example_robot.launch) in ROS Noetic. The /radar/image topic is being generated and visible in rviz, the gazebo simulation also seems to be working fine.

I was wondering if there is a way to obtain a 3D representation of the radar data, either as Pointcloud or Depth Image as can be seen in the Readme of https://github.com/uos/radarays_ros. The mesh plugin for rviz is not showing up, even though I installed the mesh_tools (https://github.com/lardemua/atom/issues/357) and the map plugin is showing up. Do I need this plugin for a possible 3D representation?

I am running the CPU version of radarays using embree.

Output of "roslaunch radarays_gazebo_plugins example_robot.launch rmagine:=embree":

... logging to /home/user/.ros/log/5e687b1a-1138-11ef-a3e6-6b938cbcbbc2/roslaunch-user-MS-7C95-8471.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://user-MS-7C95:41693/

SUMMARY
========

PARAMETERS
 * /gazebo/enable_ros_network: True
 * /robot_description: <?xml version="1....
 * /robot_state_publisher/publish_frequency: 100.0
 * /robot_state_publisher/tf_prefix: 
 * /rosdistro: noetic
 * /rosversion: 1.16.0
 * /use_sim_time: True

NODES
  /
    gazebo (gazebo_ros/gzserver)
    gazebo_gui (gazebo_ros/gzclient)
    joint_state_publisher (joint_state_publisher/joint_state_publisher)
    robot_state_publisher (robot_state_publisher/robot_state_publisher)
    spawn_robot_model (gazebo_ros/spawn_model)

auto-starting new master
process[master]: started with pid [8481]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 5e687b1a-1138-11ef-a3e6-6b938cbcbbc2
process[rosout-1]: started with pid [8491]
started core service [/rosout]
process[gazebo-2]: started with pid [8498]
process[gazebo_gui-3]: started with pid [8503]
process[spawn_robot_model-4]: started with pid [8507]
process[robot_state_publisher-5]: started with pid [8509]
process[joint_state_publisher-6]: started with pid [8510]
[INFO] [1715611927.892047, 0.000000]: Loading model XML from ros parameter robot_description
[INFO] [1715611927.894688, 0.000000]: Waiting for service /gazebo/spawn_urdf_model
Gazebo multi-robot simulator, version 11.11.0
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

[Wrn] [GuiIface.cc:200] g/gui-plugin is really loading a SystemPlugin. To load a GUI plugin please use --gui-client-plugin 
Gazebo multi-robot simulator, version 11.11.0
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

[Err] [Plugin.hh:212] Failed to load plugin libradarays_optix_sensors_gzregister.so: libradarays_optix_sensors_gzregister.so: cannot open shared object file: No such file or directory
[ INFO] [1715611928.025986809]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1715611928.026742931]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[Msg] Waiting for master.
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 192.168.0.20
[ INFO] [1715611928.051219330]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1715611928.052911005]: waitForService: Service [/gazebo_gui/set_physics_properties] has not been advertised, waiting...
[Msg] Waiting for master.
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 192.168.0.20
[Msg] Loading world file [/home/user/radar_ws/src/radarays_gazebo_plugins/worlds/avz_collada.world]
[ INFO] [1715611928.757168098]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1715611928.767736293]: Physics dynamic reconfigure ready.
[Dbg] [rmagine_embree_map_gzplugin.cpp:42] [RmagineEmbreeMap] Constructed.
[Dbg] [rmagine_embree_map_gzplugin.cpp:72] [RmagineEmbreeMap] Starting updater thread.
[Dbg] [rmagine_embree_map_gzplugin.cpp:100] [RmagineEmbreeMap] Loaded.
[Dbg] [rmagine_embree_map_gzplugin.cpp:75] Updater thread started.
[Err] [Plugin.hh:212] Failed to load plugin librmagine_optix_map_gzplugin.so: librmagine_optix_map_gzplugin.so: cannot open shared object file: No such file or directory
[Dbg] [embree_conversions.cpp:382] load mesh with gazebo 
[Dbg] [embree_conversions.cpp:392] Gazebo Import: Loading mesh from file /home/user/radar_ws/src/radarays_gazebo_plugins/worlds/./avz_no_roof.stl
[Dbg] [embree_conversions.cpp:289] GAZEBO mesh loaded: 
[Dbg] [embree_conversions.cpp:290] - name: /home/user/radar_ws/src/radarays_gazebo_plugins/worlds/./avz_no_roof.stl
[Dbg] [embree_conversions.cpp:291] - vertices: 33312
[Dbg] [embree_conversions.cpp:292] - normals: 33312
[Dbg] [embree_conversions.cpp:293] - indices: 33312
[Dbg] [embree_conversions.cpp:294] - min, max: v[-16.86,-33.848,-2.93599], v[10.988,14.644,3.98801]
[Dbg] [embree_conversions.cpp:295] - materials: 0
[Dbg] [embree_conversions.cpp:296] - sub meshes: 1
[Dbg] [embree_conversions.cpp:302] SUBMESH 0
[Dbg] [embree_conversions.cpp:303] -- name: 
[Dbg] [embree_conversions.cpp:304] -- vertices: 33312
[Dbg] [embree_conversions.cpp:305] -- normals: 33312
[Dbg] [embree_conversions.cpp:306] -- indices: 33312
[Dbg] [embree_conversions.cpp:307] -- faces (indices/3): 11104
[Dbg] [embree_conversions.cpp:308] -- tex coords: 0
[Dbg] [embree_conversions.cpp:309] -- node assignments: 0
[Dbg] [embree_conversions.cpp:310] -- mat index: 4294967295
[Dbg] [embree_conversions.cpp:311] -- min, max: v[-16.86,-33.848,-2.93599], v[10.988,14.644,3.98801]
[Dbg] [embree_conversions.cpp:322] Converting vertices
[Dbg] [embree_conversions.cpp:329] Converting faces
[Dbg] [embree_conversions.cpp:343] Converting vertex normals
[Dbg] [embree_conversions.cpp:354] Compute face normals
[Dbg] [embree_conversions.cpp:357] Build acceleration structures
[Dbg] [embree_conversions.cpp:361] Add to scene
[Dbg] [rmagine_embree_map_gzplugin.cpp:718] Added models loaded.
[Dbg] [rmagine_embree_map_gzplugin.cpp:927] [RmagineEmbreeMap] Number of map elements changed
[Dbg] [rmagine_embree_map_gzplugin.cpp:928] [RmagineEmbreeMap] - geometries: 2
[Dbg] [rmagine_embree_map_gzplugin.cpp:929] [RmagineEmbreeMap] - instances: 2
[Dbg] [rmagine_embree_map_gzplugin.cpp:930] [RmagineEmbreeMap] --- meshes: 0
[Dbg] [rmagine_embree_map_gzplugin.cpp:931] [RmagineEmbreeMap] --- instances: 2
[Dbg] [rmagine_embree_map_gzplugin.cpp:947] [RmagineEmbreeMap] Scene commit in 6.936e-05s
[INFO] [1715611928.798325, 0.000000]: Calling service /gazebo/spawn_urdf_model
[Dbg] [rmagine_embree_spherical_gzplugin.cpp:83] [RmagineEmbreeSpherical] Constructed.
[Dbg] [radarays_embree_gzplugin.cpp:53] [RadaRaysEmbree] Constructed.
[Dbg] [rmagine_embree_spherical_gzplugin.cpp:39] [RmagineEmbreeSpherical] fetching parameters from sdf
Get Parent Entity: robot_sensor::base_footprint
LOAD - RadaRaysEmbree!
[Wrn] [msgs.cc:1842] Conversion of sensor type[radarays_embree] not supported.
[INFO] [1715611928.995401, 0.164000]: Spawn status: SpawnModel: Successfully spawned entity
[Dbg] [rmagine_embree_map_gzplugin.cpp:718] Added models loaded.
[Dbg] [rmagine_embree_map_gzplugin.cpp:927] [RmagineEmbreeMap] Number of map elements changed
[Dbg] [rmagine_embree_map_gzplugin.cpp:928] [RmagineEmbreeMap] - geometries: 2
[Dbg] [rmagine_embree_map_gzplugin.cpp:929] [RmagineEmbreeMap] - instances: 2
[Dbg] [rmagine_embree_map_gzplugin.cpp:930] [RmagineEmbreeMap] --- meshes: 0
[Dbg] [rmagine_embree_map_gzplugin.cpp:931] [RmagineEmbreeMap] --- instances: 2
[ INFO] [1715611929.022929801, 0.164000000]: [RadaRaysEmbreeROS] Loaded.
[ INFO] [1715611929.033869668, 0.164000000]: RadaRaysEmbree - Changing Model
[Dbg] [rmagine_embree_map_gzplugin.cpp:974] [RmagineEmbreeMap] Found Rmagine spherical sensor default::robot_sensor::base_footprint::radar
!!!! SET MAP
[RmagineEmbreeSpherical] RmagineEmbreeMap found.
[Wrn] [Event.cc:61] Warning: Deleting a connection right after creation. Make sure to save the ConnectionPtr from a Connect call
[Wrn] [msgs.cc:1842] Conversion of sensor type[radarays_embree] not supported.
[ WARN] [1715611929.103940508, 0.164000000]: GazeboRosSkidSteerDrive Plugin (ns = //) missing <commandTopic>, defaults to "cmd_vel"                                                                                                          
[ WARN] [1715611929.103968678, 0.164000000]: GazeboRosSkidSteerDrive Plugin (ns = //) missing <odometryTopic>, defaults to "odom"
[ WARN] [1715611929.103979868, 0.164000000]: GazeboRosSkidSteerDrive Plugin (ns = //) missing <odometryFrame>, defaults to "odom"
[ WARN] [1715611929.103994848, 0.164000000]: GazeboRosSkidSteerDrive Plugin (ns = //) missing <covariance_x>, defaults to 0.000100
[ WARN] [1715611929.104005368, 0.164000000]: GazeboRosSkidSteerDrive Plugin (ns = //) missing <covariance_y>, defaults to 0.000100
[ WARN] [1715611929.104017758, 0.164000000]: GazeboRosSkidSteerDrive Plugin (ns = //) missing <covariance_yaw>, defaults to 0.010000
[ INFO] [1715611929.104053288, 0.164000000]: Starting GazeboRosSkidSteerDrive Plugin (ns = //)
[ INFO] [1715611929.110686855, 0.164000000]: imu plugin missing <frameName>, defaults to <bodyName>
Search for materials!!
Found RadaRays material in: plane1_model/body/visual_1
SEARCH FOR: plane1_model::body::visual_1
1.: plane1_model::body::visual_1
FOUND OBJ ID: 1
FOUND MODEL: plane1_model::body::visual_1
 -> embree map geometry id: 1
Found RadaRays material in: avz_map/avz_map_link/avz_map_visual
SEARCH FOR: avz_map::avz_map_link::avz_map_visual
1.: plane1_model::body::visual_1
0.: avz_map::avz_map_link::avz_map_visual
FOUND OBJ ID: 0
FOUND MODEL: avz_map::avz_map_link::avz_map_visual
 -> embree map geometry id: 0
Error [Element.cc:914] Missing element description for [radarays_material]
-- Setting RadaRays materials to defaults
SEARCH FOR: robot_sensor::base_footprint::base_footprint_fixed_joint_lump__base_link_visual
1.: plane1_model::body::visual_1
0.: avz_map::avz_map_link::avz_map_visual
FOUND MODEL: robot_sensor::base_footprint::base_footprint_fixed_joint_lump__base_link_visual
Error [Element.cc:914] Missing element description for [radarays_material]
-- Setting RadaRays materials to defaults
SEARCH FOR: robot_sensor::base_footprint::base_footprint_fixed_joint_lump__imu_visual_1
1.: plane1_model::body::visual_1
0.: avz_map::avz_map_link::avz_map_visual
FOUND MODEL: robot_sensor::base_footprint::base_footprint_fixed_joint_lump__imu_visual_1
Error [Element.cc:914] Missing element description for [radarays_material]
-- Setting RadaRays materials to defaults
SEARCH FOR: robot_sensor::base_footprint::base_footprint_fixed_joint_lump__radar_visual_2
1.: plane1_model::body::visual_1
0.: avz_map::avz_map_link::avz_map_visual
FOUND MODEL: robot_sensor::base_footprint::base_footprint_fixed_joint_lump__radar_visual_2
Error [Element.cc:914] Missing element description for [radarays_material]
-- Setting RadaRays materials to defaults
SEARCH FOR: robot_sensor::left_front_wheel_link::left_front_wheel_link_visual
1.: plane1_model::body::visual_1
0.: avz_map::avz_map_link::avz_map_visual
FOUND MODEL: robot_sensor::left_front_wheel_link::left_front_wheel_link_visual
Error [Element.cc:914] Missing element description for [radarays_material]
-- Setting RadaRays materials to defaults
SEARCH FOR: robot_sensor::left_rear_wheel_link::left_rear_wheel_link_visual
1.: plane1_model::body::visual_1
0.: avz_map::avz_map_link::avz_map_visual
FOUND MODEL: robot_sensor::left_rear_wheel_link::left_rear_wheel_link_visual
Error [Element.cc:914] Missing element description for [radarays_material]
-- Setting RadaRays materials to defaults
SEARCH FOR: robot_sensor::right_front_wheel_link::right_front_wheel_link_visual
1.: plane1_model::body::visual_1
0.: avz_map::avz_map_link::avz_map_visual
FOUND MODEL: robot_sensor::right_front_wheel_link::right_front_wheel_link_visual
Error [Element.cc:914] Missing element description for [radarays_material]
-- Setting RadaRays materials to defaults
SEARCH FOR: robot_sensor::right_rear_wheel_link::right_rear_wheel_link_visual
1.: plane1_model::body::visual_1
0.: avz_map::avz_map_link::avz_map_visual
FOUND MODEL: robot_sensor::right_rear_wheel_link::right_rear_wheel_link_visual
[RadaRaysEmbree] Resize canvas to 3424
[RadaRaysEmbree] Resizing canvas - done.
Created new simulator for thread 0
Created new simulator for thread 3
Created new simulator for thread 5
Created new simulator for thread 2
Created new simulator for thread 1
Created new simulator for thread 10
Created new simulator for thread 6
Created new simulator for thread 4
Created new simulator for thread 8
Created new simulator for thread 7
Created new simulator for thread 11
Created new simulator for thread 9
[Wrn] [msgs.cc:1842] Conversion of sensor type[radarays_embree] not supported.
[spawn_robot_model-4] process has finished cleanly
log file: /home/user/.ros/log/5e687b1a-1138-11ef-a3e6-6b938cbcbbc2/spawn_robot_model-4*.log

Thanks in advance!

amock commented 6 months ago

Hi!

Great to hear that it's running on another computer. The project radarays_ros contains an experiment using the MulRan datasets to show the similarity between real and simulated radar polar images. The middle of the image just shows one of the MulRan environments. A triangle mesh map, the car localized in it, and the colorful points are a point cloud produced from a real LiDAR. So to answer your question: No, there are only 2D radar polar images generated within this repository.

amock commented 6 months ago

For this plugin you don't need the mesh_tools. If you still want to visualize meshes (in this or other situations) I recommend using the noetic branch of this repo https://github.com/naturerobots/mesh_tools , since the official release package ros-noetic-mesh-tools is unstable