Set the initialpose (ROS2)
Hello I am still relatively new to ROS2 and am currently working on getting my digital Turtlebot3 to drive around in a Gazebo environment. I'm using ROS2 foxy on Ubuntu 20.04 and for navigation I use navigation2.
I then execute the following commands:
ros2 launch gazebo_ros gzserver.launch.py world:=/home/.../env.world
ros2 run gazebo_ros spawn_entity.py -file /home/.../environment.sdf -entity environment
ros2 launch turtlebot3_gazebo robot_state_publisher.launch.py
ros2 launch nav2_bringup bringup_launch.py use_sim_time:=True autostart:=True map:=/home/map.yaml
Now the following error occurs at the last command.
[amcl-2] [WARN] [1620937828.832260000] [amcl]: ACML cannot publish a pose or update the transform. Please set the initial pose...
How do I set the initial pose? I know that you can do it via Rviz, but in this case I want to solve it without RViz (with a command or programmatically via rclpy).