ROBOTIS-GIT / turtlebot3_simulations

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

Problem to set custom namespace when to try to spawn a robot on gazebo #182

Open federicociresola opened 2 years ago

federicociresola commented 2 years ago

Hi guys, while I was working on my project on ROS2 with Galatic version, I found a little problem while trying to set a custom namespace when calling the launch spawn_turtlebot3.launch.py for Gazebo. My aim is to set a custom namespace as the prefix on the topics published by the node of turtlebot3.

In the initial step, I tried to use the GroupAction to set the namespace through the method PushRosNamespace but it doesn't work in the correct way and I am still trying to figure out the why of this.

So I decided to modify the file and I added the following code:

In this way, when somebody calls the launch file from CLI, or from another Launch file, the custom namespace can be set in easy way.

Is it normal that i have to go through all of these steps to achieve the result i want? Is there a better way to do this, which doesn't involve modifying the file in this repository? If there is not, maybe these changes can be included, maybe with a pull request by me? Thanks your understanding