[nav2] nav2_gazebo_spawner does not support specifying yaw
the gazebo spawner supports specifying the x,y,z position. However, there is not way to provide roll, pitch, yaw when spawning a robot.
This seems like a simple enough thing to do. If it's not enabled for some reason, can someone help explain the reason? If it's not enabled because nobody added it, I would be happy to make those changes and submit a pull request.
Asked by spoluri on 2021-08-03 14:25:03 UTC
Answers
I'm not a Nav2 developer, but my guess is it was likely a hesitancy by the developers to include a dependency on a quaternion math library (or implement the functions themselves). The gazebo spawner requires quaternion orientation rather than Euler angles (roll, pitch, yaw) that most users would probably want to use.
I had added support for yaw input a while back in an offshoot that I'd worked on to load robots defined with xacro files. You're welcome to take a look here. Including roll and pitch as well is simple enough.
Asked by shonigmann on 2021-08-03 17:50:18 UTC
Comments
I'm actually not sure who wrote that. It looks to me like a short term hack because gazebo wasn't totally ported to ROS2 yet and it was just overlooked. I'd be happy to include orientation. Long term, I'd like to go back to using the gazebo_ros spawner https://github.com/ros-simulation/gazebo_ros_pkgs/blob/ros2/gazebo_ros/scripts/spawn_entity.py which does nearly the exact same thing, but it doesn't work right now with namespacing for multiple robots https://github.com/ros-simulation/gazebo_ros_pkgs/issues/1301 which is the only thing preventing me from deleting the nav2_gazebo_spawner entirely.
A PR would be appreciated.
Asked by stevemacenski on 2021-08-04 13:12:26 UTC
Comments