ROBOTIS-GIT / turtlebot3_simulations

Simulations for TurtleBot3
http://turtlebot3.robotis.com/
Apache License 2.0
309 stars 427 forks source link

Automatically make the models available to gazebo_ros #129

Closed Rayman closed 3 years ago

Rayman commented 3 years ago

By adding gazebo_model_path to the exports of this package, the models directory will be automatically available if you are using gazebo.launch.py. This means that you don't need to set GAZEBO_MODEL_PATH this in your .bashrc or in other places.

This was implemented in the ROS1 branch but the change was somehow forgotten.

Also fix #123

joe28965 commented 3 years ago

This doesn't actually add the directories to GAZEBO_MODEL_PATH. This makes them available for gazebo_ros, and the gzserver.launch.py from gazebo_ros_pkgs makes them available for gazebo in line 62. This is also described here. This means that you are now dependent on that gazebo_ros launch file.

Rayman commented 3 years ago

@joe28965 yes that's exactly how it works. I've rephrased my PR to reflect this better.

On your second point, you are now dependent on gazebo_ros, this is not a problem because this package already had a (indirect) dependency on gazebo_ros trough gazebo_ros_pkgs.

joe28965 commented 3 years ago

True, you're right on the second point.

On the first point, your rephrasing is good. I think it'll help to avoid confusion. It looks good now, less chance for new users to get confused.

Overall, it's definitely nice to not have to add another line to the bashrc if it's not needed. This way it should also help new users with using the simulations.

Rayman commented 3 years ago

Friendly ping :)

JaehyunShim commented 3 years ago

@Rayman @joe28965

Thanks for your contribution to the repository. The change you made in your commit is a gazebo_ros_path plugin, not an env-hook (link). I have not figured out how env-hooks work but it should be more simple and intuitive to just use the gazebo ros plugin here rather than env-hooks since the model files in the package are going to be used only for Gazebo simulation anyway.

@ashekim

  1. First, check if the following line is needed, if not, please remove. (as far as I understand, turtlebot3_simulation should be compilable without the turtlebot3 repository.
  2. I tested the above-mentioned plugin for another robot platform and It worked fine without any problems. Please test this commit, see if it passes CI, and merge it to the ros2-devel branch.

Thanks, Jaehyun

ROBOTIS-Ashe commented 3 years ago

@JaehyunShim

Hi. Sorry for the late reply. I will test this commit and if there is no problem, I will merge with the ros2-devel branch after CI pass

Thank you :)

Rayman commented 3 years ago

Hey @ashekim, have you had time to test this PR?