ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

[nav2] nav2_gazebo_spawner does not support specifying yaw

asked 2021-08-03 14:25:03 -0500

spoluri gravatar image

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.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2021-08-03 17:50:18 -0500

shonigmann gravatar image

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.

edit flag offensive delete link more
0

answered 2021-08-04 13:12:26 -0500

updated 2021-08-04 13:13:17 -0500

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/gaz... which does nearly the exact same thing, but it doesn't work right now with namespacing for multiple robots https://github.com/ros-simulation/gaz... which is the only thing preventing me from deleting the nav2_gazebo_spawner entirely.

A PR would be appreciated.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2021-08-03 14:25:03 -0500

Seen: 200 times

Last updated: Aug 04 '21