-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gazebo support (draft) #19
Conversation
c539851
to
0434485
Compare
|
||
<gazebo reference="laser_frame"> | ||
<!--sensor type="gpu_ray" name="lidar"--> | ||
<sensor type="ray" name="lidar"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm using ray here because gpu_ray
returns infinity for all points even the one hitting obstacles.
also it prints this warning:
[gazebo-1] [Wrn] [msgs.cc:1852] Conversion of sensor type[gpu_ray] not supported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That warning can be ignored.
Does your model have visuals besides collisions? The gpu_ray
sees visuals, while the ray
sees collisions.
Can you reproduce the issue with this demo world? https://github.com/ros-simulation/gazebo_ros_pkgs/blob/ros2/gazebo_plugins/worlds/gazebo_ros_ray_sensor_demo.world
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm using only primitive shapes that I dropped in the world from the Gazebo UI, I think they have both visual and collision.
Thanks for the pointer, we'll try it on the demo world to see if it's the same.
Note: I'm compiling the gazebo plugins from source without any specific flags, maybe GPU support is not enabled?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think they have both visual and collision.
Yup, they do
I'm compiling the gazebo plugins from source without any specific flags, maybe GPU support is not enabled?
There are no flags to disable GPU support, so compilation should be working correctly. At runtime, if gzclient
works, then I'd expect the rendering sensors to work as well. You could double-check by dropping a camera in the world and seeing if the images show the shapes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chapulina Sorry for the delay, I fInally got a chance to try the demo world (using the dashing debs), and I'm facing the same issue:
command ran:
gazebo --verbose /opt/ros/dashing/share/gazebo_plugins/worlds/gazebo_ros_ray_sensor_demo.world```
Regular ray sensor works (some non inf values)
$ ros2 topic echo /ray/laserscan
header:
stamp:
sec: 13
nanosec: 25000000
frame_id: ray_link
angle_min: -0.5235999822616577
angle_max: 0.5235999822616577
angle_increment: 0.0035023412201553583
time_increment: 0.0
scan_time: 0.0
range_min: 0.05000000074505806
range_max: 50.0
ranges: [.inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, 2.0448575019836426, 2.0313127040863037, 2.0236432552337646, 2.018503189086914, 2.0150201320648193, 2.0128238201141357, 2.0117366313934326, 2.0116827487945557, 2.0126583576202393, 2.0147311687469482, 2.0180652141571045, 2.0230026245117188, 2.030329465866089, 2.0427944660186768, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, 1.455374836921692, 1.45494544506073, 1.4545341730117798, '...']
intensities: [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, 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, 0.0, 60.0, 60.0, 60.0, 60.0, 60.0, 60.0, 60.0, 60.0, 60.0, 60.0, 60.0, 60.0, 60.0, 60.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.0, 0.0, 0.0, 100.0, 100.0, 100.0, '...']
gpu_ray sensor returns only infinity
$ ros2 topic echo /gpu_ray/laserscan
header:
stamp:
sec: 7
nanosec: 0
frame_id: ray_link
angle_min: -0.5235999822616577
angle_max: 0.5235999822616577
angle_increment: 0.0035023412201553583
time_increment: 0.0
scan_time: 0.0
range_min: 0.05000000074505806
range_max: 50.0
ranges: [-.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, -.inf, '...']
intensities: [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, '...']
I tried the camera demo and can see the objects successfully:
gazebo --verbose /opt/ros/dashing/share/gazebo_plugins/worlds/gazebo_ros_camera_demo.world
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, I get very similar readings from both of them, I'm on a source install.
$ ros2 topic echo /gpu_ray/laserscan
header:
stamp:
sec: 139
nanosec: 2000000
frame_id: ray_link
angle_min: -0.5235999822616577
angle_max: 0.5235999822616577
angle_increment: 0.0035023412201553583
time_increment: 0.0
scan_time: 0.0
range_min: 0.05000000074505806
range_max: 50.0
ranges: [.inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, 2.0503170490264893, 2.033238172531128, 2.024780511856079, 2.0192136764526367, 2.0154314041137695, 2.012951612472534, 2.011847734451294, 2.0118982791900635, 2.0129361152648926, 2.0150675773620605, 2.0186455249786377, 2.0241785049438477, 2.032437562942505, 2.0490212440490723, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, 1.454956293106079, 1.4545066356658936, '...']
intensities: [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, 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, 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, 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, '...']
---
$ ros2 topic echo /ray/laserscan
header:
stamp:
sec: 153
nanosec: 18000000
frame_id: ray_link
angle_min: -0.5235999822616577
angle_max: 0.5235999822616577
angle_increment: 0.0035023412201553583
time_increment: 0.0
scan_time: 0.0
range_min: 0.05000000074505806
range_max: 50.0
ranges: [.inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, 2.0448575019836426, 2.0313127040863037, 2.0236432552337646, 2.018503189086914, 2.0150201320648193, 2.0128238201141357, 2.0117366313934326, 2.0116827487945557, 2.0126583576202393, 2.0147311687469482, 2.0180652141571045, 2.0230026245117188, 2.030329465866089, 2.0427944660186768, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, .inf, 1.455374836921692, 1.45494544506073, 1.4545341730117798, '...']
intensities: [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, 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, 0.0, 60.0, 60.0, 60.0, 60.0, 60.0, 60.0, 60.0, 60.0, 60.0, 60.0, 60.0, 60.0, 60.0, 60.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.0, 0.0, 0.0, 100.0, 100.0, 100.0, '...']
---
Do the GPU readings look right on Gazebo's topic viewer (Ctrl + T
, and you need to zoom in):
I can only think it's an issue with your graphics, but I'm not sure why the RGB camera works. Are the point cloud messages working?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can only think it's an issue with your graphics, but I'm not sure why the RGB camera works.
Yeah I had some issues of RViz being very slow as well. I ended up reinstalling all the graphics drivers and it seems to have fixed the issue !
Thanks for taking the time to reproduce 🙇♂️ !
How I'm testing this: ros2.repos + additionnal_repos.repos in an underlay
Running: Shell 1:
Shell 2
Shell 3:
|
Worked around it upstream, CI is green |
Things that don't work as originally expected: GPU ray: Simulation time: Published transforms
@Karsten1987 as you said you had a different gazebo demo available, any clue as of what should be changed here? (maybe @chapulina has some insights as well?) |
Maybe it's due to ros2/rviz#332 ? I've seen something similar with wheel transforms on the diff drive demo, see ros-simulation/gazebo_ros_pkgs#806 (comment) |
Maybe it was https://github.com/chapulina/dolly/ ? I've visualized the laser scans on RViz, but since the laser update rate itself is low on purpose, I probably never noticed that problem. Turn the bug into a feature 😉 |
Thanks! It looks like the same issue, I tried the referenced PR enabling @Karsten1987 I'll be away from a computer for the next couple weeks, would you mind giving this a try when you get a chance ? |
rename links and joints to have semantic names add inertia to all links add laser and diffdrive plugins Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
This reverts commit b79ca27.
Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
I've rebased this branch on top of the latest master to be able to compile to latest ros2 master. |
So I gave this a shot and had only very poor results. I can't get around the TF error independent on where to set I'll try to catch @chapulina in the next few days to sort this out offline. |
Signed-off-by: Karsten Knese <karsten@openrobotics.org>
Signed-off-by: Karsten Knese <karsten@openrobotics.org>
For setting the |
Signed-off-by: Karsten Knese <karsten@openrobotics.org>
we could boil it down far enough to make it work flawless when setting the fixed frame in RViz to the While working with the laser, we've found that the orientation in the urdf must be wrong. Then by visualizing the laser scan in Gazebo, we've noticed that the laser is wrongly rotated around 90 degrees. |
Signed-off-by: Karsten Knese <karsten@openrobotics.org>
Signed-off-by: Karsten Knese <karsten@openrobotics.org>
Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
Need to create an optical frame to match REP103 as camera plugin uses x forward and not z forward Need to source Gazebo setup file manually for the camera plugin to be found and loaded successfully No namespace provided to plugin as it appends the sensor name to the namespace already, otherwise results in /confbot_camera/confobt_camera/image_raw Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
|
||
##### Simulating the robot in Gazebo | ||
|
||
Make sure to kill all the running nodes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great opening :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nothing like a grand entrance for a tutorial :)
I'll merge this as an initial version and ticket pending issues / open follow-up PRs |
DO NOT MERGE It was initially marked as draft but apparently something went wrong on page refresh