osrf / subt

This repostory contains software for the virtual track of the DARPA SubT Challenge. Within this repository you will find Gazebo simulation assets, ROS interfaces, support scripts and plugins, and documentation needed to compete in the SubT Virtual Challenge.
Other
305 stars 98 forks source link

Missing 3D LIDAR sensor data #87

Closed osrf-migration closed 5 years ago

osrf-migration commented 5 years ago

Original report (archived issue) by Jon Fink (Bitbucket: jonfink-arl).


Configurations with 3D LIDAR (e.g., X1_CONFIG_4) are not properly populating a ROS topic with sensor_msgs/PointCloud2 data.

osrf-migration commented 5 years ago

Original comment by Jon Fink (Bitbucket: jonfink-arl).


It seems as though a fix is coming from upstream (https://github.com/osrf/ros1_ign_bridge/pull/21) but I believe this will also require an update to the ignition fuel models to add a snippet like this:

 <plugin
    filename="libRos1IgnPointCloud.so"
    name="ros1_ign_point_cloud::PointCloud">
    <namespace>custom_params</namespace>
    <topic>points</topic>
    <frame_id>custom_params/link</frame_id>
  </plugin>

to the appropriate SDF files.

I am also not sure the difference between the sensor types gpu_ray (current) and gpu_lidar (used in the examples provided in the above linked PR to ros1_ign_bridge)

osrf-migration commented 5 years ago

Original comment by Jon Fink (Bitbucket: jonfink-arl).


osrf-migration commented 5 years ago

Original comment by Alfredo Bencomo (Bitbucket: bencomo).


Louise has been working on this, so it will be available very soon.

osrf-migration commented 5 years ago

Original comment by Ethan Stump (Bitbucket: estump-arl).


I can confirm that I can get 3D LIDAR data working with a few steps:

  1. Switched to the lidar branch of ros1_ign_bridge (i.e. https://github.com/osrf/ros1_ign_bridge/pull/21)
  2. Added the Ros1IgnPointCloud plugin into the appropriate model SDF (see below)

I was on the branch that uses models from the azeey section of the Fuel repository, so I have a modified version of model.sdf from X1 Config 4 here: https://bitbucket.org/snippets/estump-arl/zA7jLe. Because fuel resources are not re-downloaded from the web if they are already present on my filesystem, I can edit my local copy and have the changes stick.

This would imply that fixing this will also involve touching the tech repo definitions, though I'm investigating whether it's possible for me to hack extra child plugins external to the model.sdf that gets included.

osrf-migration commented 5 years ago

Original comment by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).


I'm working on it, I'll do it from the virtual_stix.ign launch file so we can inject the correct robot model names into the ROS topics and frames.

I have it working for a single robot in the world. Just need a couple new features on ign-gazebo to make it work for multiple robots. Stay tuned!

osrf-migration commented 5 years ago

Original comment by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).


Here's the PR: https://osrf-migration.github.io/subt-gh-pages/#!/osrf/subt/pull-requests/167/

osrf-migration commented 5 years ago

Original comment by Ethan Stump (Bitbucket: estump-arl).


Thanks @chapulina , I got this to work after I merged the remap_default_topics branch onto point_cloud. I was in the middle of modifying the point cloud plugin to search down the component tree to get the correct sensor, but I think I like your method better since it lets any plugin be pushed down onto a component.

Once the configuration updates from remap_default_topics are merged on and this PR is merged, I think this issue is closed!

osrf-migration commented 5 years ago

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).


I believe everything has been merged.

osrf-migration commented 5 years ago

Original comment by Sarah Kitchen (Bitbucket: snkitche).


I’ve just repeated the catkin workspace install instructions for tunnel_circuit, and am not even seeing an /X1/points topic when I launch the following:

 ign launch -v 4 virtual_stix.ign robotName1:=X1 robotConfig1:=X1_SENSOR_CONFIG_4

The /X1/pose and /X1/odom echo messages, but /X1/imu/data, /X1/front/image_raw, and /X1/front_scan do not. Likewise with tunnel_circuit_practice.ign. The competition.ign file does not launch anything – I receive lots of “Parent entity…not found” error messages.

ETA: competition.ign launches now

osrf-migration commented 5 years ago

Original comment by Alfredo Bencomo (Bitbucket: bencomo).


Sarah,

You probably need to update your Tunnel Circuit branch and catkin build your workspace again. I just checked and they show up listed.

ign launch -v 4 competition.ign robotName1:=X1 robotConfig1:=X1_SENSOR_CONFIG_4

osrf-migration commented 5 years ago

Original comment by Sarah Kitchen (Bitbucket: snkitche).


I just updated, and the topics listed and what they publish has not changed:

snkitche@precision7530a:~/Documents/subt_ign_ws$ rostopic list
/X1/air_pressure
/X1/cmd_vel
/X1/command/motor_speed
/X1/front/camera_info
/X1/front/image_raw
/X1/front_scan
/X1/imu/data
/X1/magnetic_field
/X1/odom
/X1/pose
/clock
/rosout
/rosout_agg
/subt/score
/tf
/tf_static
snkitche@precision7530a:~/Documents/subt_ign_ws$ rostopic echo /X1/front_scan
WARNING: no messages received and simulated time is active.
Is /clock being published?
^Csnkitche@precision7530a:~/Documents/subt_ign_ws$ rostopic echo /X1/imu/data
WARNING: no messages received and simulated time is active.
Is /clock being published?
^C^[[Asnkitche@precision7530a:~/Documents/subt_ign_ws$ rostopic echo /X1/imu/dat
snkitche@precision7530a:~/Documents/subt_ign_ws$ rostopic echo /X1/front/image_raw
WARNING: no messages received and simulated time is active.
Is /clock being published?
^Csnkitche@precision7530a:~/Documents/subt_ign_ws$ rostopic echo /X1/cmd_vel
WARNING: topic [/X1/frcmd_vel] does not appear to be published yet
^Csnkitche@precision7530a:~/Documents/subt_ign_ws$ rostopic echo /X1/odom
header: 
  seq: 23271
  stamp: 
    secs: 378
    nsecs: 568000000
  frame_id: "X1"
child_frame_id: "base"
pose: 
  pose: 
    position: 
      x: 2.63236131312e-16
      y: -2.32379894978e-28
      z: 0.0
    orientation: 
      x: 0.0
      y: 0.0
      z: 3.43250403368e-17
      w: 1.0
  covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
twist: 
  twist: 
    linear: 
      x: 1.73796158858e-18
      y: 0.0
      z: 0.0
    angular: 
      x: 0.0
      y: 0.0
      z: 3.14381765056e-18
  covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
---

According to your documentation, 3D lidar should be on the /X1/points topic, which is not present.

I also don’t see X1/base_link as a fixed frame option in rviz or in the entity tree in the Ignition GUI, and get a RobotModel error in rviz stating “No transform from [X1/base_link] to [X1/base].

Update: Just tried the following

ign launch -v 4 tunnel_circuit_practice.ign robotName1:=X1 robotConfig1:=X1_SENSOR_CONFIG_4 robotName2:=X2 robotConfig2:=X2_SENSOR_CONFIG_6

X2 appears to be publishing lidar data to /X2/front_scan, though that topic is supposed to be for planar lidar, not 3D lidar that config 6 should have. /X2/base_link is present in rviz, but not /X1/base_link.

Update 2: I deleted the models directory in ~/.ignition/fuel/fuel.ignitionrobotics.org/openrobotics/ to force a model update. Now I have base_link for X1, but am getting these warnings from rviz:

snkitche@precision7530a:~/Documents/subt_ign_ws$ rosrun rviz rviz
[ INFO] [1562174526.935586648]: rviz version 1.13.3
[ INFO] [1562174526.935642659]: compiled against Qt version 5.9.5
[ INFO] [1562174526.935655646]: compiled against OGRE version 1.9.0 (Ghadamon)
[ INFO] [1562174532.274876121, 38.219000000]: Stereo is NOT SUPPORTED
[ INFO] [1562174532.277764403, 38.221000000]: OpenGl version: 4.6 (GLSL 4.6).
[ WARN] [1562174532.606568825, 6.951000000]: Detected jump back in time of 31.328s. Clearing TF buffer.
[ WARN] [1562174532.622043851, 6.954000000]: Detected jump back in time of 31.331s. Clearing TF buffer.
[ WARN] [1562174532.629890941, 6.957000000]: Detected jump back in time of 31.331s. Clearing TF buffer.
[ WARN] [1562174532.634243959, 6.958000000]: Detected jump back in time of 31.331s. Clearing TF buffer.
[ WARN] [1562174532.642038649, 6.961000000]: Detected jump back in time of 31.331s. Clearing TF buffer.
[ WARN] [1562174532.646096309, 6.962000000]: Detected jump back in time of 31.332s. Clearing TF buffer.
[ WARN] [1562174532.648936636, 6.963000000]: Detected jump back in time of 31.332s. Clearing TF buffer.
[ WARN] [1562174532.651995205, 6.964000000]: Detected jump back in time of 31.332s. Clearing TF buffer.
[ WARN] [1562174532.663782591, 6.968000000]: Detected jump back in time of 31.33s. Clearing TF buffer.
[ WARN] [1562174532.671759900, 6.970000000]: Detected jump back in time of 31.329s. Clearing TF buffer.
[ WARN] [1562174532.690283155, 6.976000000]: Detected jump back in time of 31.324s. Clearing TF buffer.

Nothing has changed with the available topics.

osrf-migration commented 5 years ago

Original comment by Sarah Kitchen (Bitbucket: snkitche).


Forcing the update of the model files so I have a base_link for X1 also appears to have fixed the problem of the laser and image topics being empty of messages. Are the model files not checked for updates every time ignition is launched?

However, I’d still expect the 3D lidar to be publishing a PointCloud2 message, like Jon states in the original issue. I don’t care what the topic is called, but the message type is important… As of right now, rostopic info /X1/front_scan returns sensor_msgs/LaserScan.

I am also getting this error:

[Err] [SystemLoader.cc:66] Failed to load system plugin [libRos1IgnPointCloud.so] : couldn't find shared library.

osrf-migration commented 5 years ago

Original comment by Alfredo Bencomo (Bitbucket: bencomo).


To see the /points topic listed, you need to install the ros-melodic-ros1-ign package.

Can you do the following?

1. Delete the complete content inside your local models/ directory:

cd ~/.ignition/fuel/fuel.ignitionrobotics.org/openrobotics/models/
rm -rfv *

2. Update all ROS and Ignition packages:

sudo apt-get update
sudo apt-get install ros-melodic-ros1-ign
sudo apt-get upgrade -y

3. Update your SubT repo:

cd ~/subt_ws/src/tunnel_circuit/
hg pull && hg up

4. Rebuild your catkin workspace:

cd ~/subt_ws/
catkin_make install

5. Launch the Virtual environment:

ign launch -v 4 competition.ign robotName1:=X1 robotConfig1:=X1_SENSOR_CONFIG_4

Notice that since you have deleted the models, the GUI will show blank/empty panels for a few minutes until the models are downloaded from the repo. It’s takes between 5-10 mins.

osrf-migration commented 5 years ago

Original comment by Sarah Kitchen (Bitbucket: snkitche).


Alfredo, see my above comment - I had just completed what you suggest as you posted. Repeated the process anyway, and did catch some minor updates to tunnel_circuit, with no additional changes in behavior that I noticed. In particular, I still am getting the error:

[Err] [SystemLoader.cc:66] Failed to load system plugin [libRos1IgnPointCloud.so] : couldn't find shared library.

Repeated, and now see the points topic.

FYI rviz is throwing the following warning and error, though I am able to reproduce what you show above:

[ WARN] [1562179391.304122238, 33.543000000]: OGRE EXCEPTION(6:FileNotFoundException): Cannot locate resource package://x1_description/meshes/wheel.dae in resource group Autodetect or any other group. in ResourceGroupManager::openResource at /build/ogre-1.9-B6QkmW/ogre-1.9-1.9.0+dfsg1/OgreMain/src/OgreResourceGroupManager.cpp (line 756)
[ERROR] [1562179391.304162372, 33.543000000]: Could not load model 'package://x1_description/meshes/wheel.dae' for link 'X1/rear_right_wheel': OGRE EXCEPTION(6:FileNotFoundException): Cannot locate resource package://x1_description/meshes/wheel.dae in resource group Autodetect or any other group. in ResourceGroupManager::openResource at /build/ogre-1.9-B6QkmW/ogre-1.9-1.9.0+dfsg1/OgreMain/src/OgreResourceGroupManager.cpp (line 756)

osrf-migration commented 5 years ago

Original comment by Alfredo Bencomo (Bitbucket: bencomo).


Point clouds are now displayed.

osrf-migration commented 4 years ago

Original comment by Alfredo Bencomo (Bitbucket: bencomo).