Gazebo | Ignition | Community
Ask Your Question
0

[Project template] diff_drive/odom frame does not exist

asked 2023-07-03 11:41:29 -0500

Simple Simpson gravatar image

updated 2023-07-03 12:04:12 -0500

TLDR: Gazebo diff_drive sim from template failed regularly yesterday, failing permanently today.

Yesterday I was running the diff_drive bot in Gazebo, from the project template, following the instructions in the README. I used the command

gz topic -t "/model/diff_drive/cmd_vel" -m gz.msgs.Twist -p "linear: {x: 1.0}, angular: {z: -0.1}"

to initiate the bot driving in a circle.

I also noticed yesterday that Gazebo regularly reported errors like this:

image description

but after restarting the errors usually went away.

Today, the error shows up every time I start simulation, and the bot does not react to the cmd_vel command. The commands I use is (note different launch file from README):

cd ~/template_ws
source /opt/ros/humble/setup.bash
colcon build --cmake-args -DBUILD_TESTING=ON
. ~/template_ws/install/setup.sh
ros2 launch ros_gz_example_bringup diff_drive.launch.py

I also experiment with starting the keyboard bridge

ros2 run ros_gz_bridge parameter_bridge /keyboard/keypress@std_msgs/msg/Int32@gz.msgs.Int32

which does not transmit any keypress from Gazebo to a terminal running

ros2 topic echo /keyboard/keypress

Any clues to what might cause the problem?

EDIT: output of ros2 topic list:

/clicked_point
/clock
/diff_drive/cmd_vel
/diff_drive/odometry
/diff_drive/scan
/goal_pose
/initialpose
/joint_states
/keyboard/keypress
/parameter_events
/robot_description
/rosout
/tf
/tf_static

But using ros2 topic echo /model/diff_drive/odometry return this:

WARNING: topic [/model/diff_drive/odometry] does not appear to be published yet
Could not determine the type for the passed topic
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-07-04 12:32:29 -0500

Simple Simpson gravatar image

Embarrasingly, the simulation was paused by default (or maybe cached in settings). All I had to do was press Play in Gazebo sim, errors are gone and the bot is doing donuts.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2023-07-03 11:41:29 -0500

Seen: 143 times

Last updated: Jul 04 '23