-
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
Merged
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
61db58e
first step to gazebo support
mikaelarguedas 3cdf7a1
add scripts taken and modifies from turtlebot3_simulation
mikaelarguedas 806188c
add simulation launchfile
mikaelarguedas 09cba9a
move urdf_spawner back in confbot_simulation
mikaelarguedas d164f5a
restore package:// path
mikaelarguedas 7bb59d9
add dependencies not part of the nightly image
mikaelarguedas 9b37f60
blacklist dependencies built from source from the test invocation
mikaelarguedas 84cc7d9
fix test failures
mikaelarguedas 1c73252
almost empty world
mikaelarguedas 3aa543d
rebasing
mikaelarguedas 60deaa4
dont set use_sim_time as currently doesn't impact time used
mikaelarguedas d7695e7
Revert "dont set use_sim_time as currently doesn't impact time used"
mikaelarguedas 7742dc2
use libgazebo_ros_init to have sim time published
mikaelarguedas d5d09f4
fix conversion error from string to bool
Karsten1987 5427e4d
actually using the sim time parameter correctly
Karsten1987 739006f
interpret launch configuration as yaml
Karsten1987 ae5f961
visualize the laser scan in gazebo
Karsten1987 394521e
use sim time
Karsten1987 e885f50
make laser_frame point forward
mikaelarguedas 6777de9
gazebo_ros now declares/set use_sim_time to true by default
mikaelarguedas 63cfa77
add camera
mikaelarguedas ea88a55
move back camera_frame on the robot base
mikaelarguedas 18e5594
add rviz config for gazebo
mikaelarguedas 82127e1
add preliminary Gazebo section
mikaelarguedas cadb71a
fix config file name in instructions
mikaelarguedas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,13 @@ | ||
repositories: | ||
gazebo_ros_pkgs: | ||
type: git | ||
url: https://github.com/ros-simulation/gazebo_ros_pkgs.git | ||
version: ros2 | ||
image_common: | ||
type: git | ||
url: https://github.com/ros-perception/image_common.git | ||
version: ros2 | ||
vision_opencv: | ||
type: git | ||
url: https://github.com/ros-perception/vision_opencv.git | ||
version: ros2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Copyright 2019 ROBOTIS CO., LTD. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# /* Author: Darby Lim */ | ||
|
||
import os | ||
|
||
from ament_index_python.packages import get_package_share_directory | ||
from launch import LaunchDescription | ||
from launch.actions import DeclareLaunchArgument | ||
from launch.substitutions import LaunchConfiguration | ||
from launch_ros.actions import Node | ||
|
||
|
||
def generate_launch_description(): | ||
urdf_file_name = 'confbot.urdf' | ||
urdf = os.path.join(get_package_share_directory('confbot_description'), 'urdf', urdf_file_name) | ||
|
||
return LaunchDescription([ | ||
DeclareLaunchArgument( | ||
'use_sim_time', | ||
default_value='True', | ||
description='Use simulation (Gazebo) clock if true'), | ||
|
||
Node( | ||
package='robot_state_publisher', | ||
node_executable='robot_state_publisher', | ||
node_name='robot_state_publisher', | ||
output='screen', | ||
parameters=[{'use_sim_time': LaunchConfiguration('use_sim_time')}], | ||
arguments=[urdf]) | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
cmake_minimum_required(VERSION 3.5) | ||
project(confbot_simulation) | ||
|
||
# find dependencies | ||
find_package(ament_cmake REQUIRED) | ||
|
||
install(DIRECTORY config launch world | ||
DESTINATION share/${PROJECT_NAME}) | ||
install(PROGRAMS ${PROJECT_NAME}/urdf_spawner.py | ||
DESTINATION lib/${PROJECT_NAME}) | ||
|
||
if(BUILD_TESTING) | ||
find_package(ament_lint_auto REQUIRED) | ||
ament_lint_auto_find_test_dependencies() | ||
endif() | ||
|
||
ament_package() |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
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 theray
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.
Yup, they do
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:
Regular ray sensor works (some non inf values)
gpu_ray sensor returns only infinity
I tried the camera demo and can see the objects successfully:
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.
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.
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 🙇♂️ !