Exercise 2.2: /cmd_vel does not have the expected message type

when I type in “rostopic info /cmd_vel”
It says

Type: std_msgs/Int32

Publishers: None

Subscribers:

Why it didn’t say anything about " geometry_msgs/Twist"??

Hi @wangxiaolong0830,

That’s strange. It’s probably because at some point, someone has published a std_msgs/Int32 message into it…

Please try to reset the simulation by going to a chapter with a different simulation and then coming back to the current one. Please let’s know how it goes.

1 Like

I think I did that lol. I only changed the name “counter” in the cpp file into “cmd_vel” and tried running it but failed. After that no matter how I check the type, it always says std_msgs/Int32. Maybe you can remind other learners in the notebook.

1 Like

I am seeing the same thing. Have you found a solution? It still shows std_msgs under /cmd_vel even after going to the next chapter and back again.

@mewescott
Go to a chapter with a different simulation. You will know it’s a different simulation if the simulation and shells are reloaded.