This is in the Project Simulation when trying to run the remote simulation model. I don’t see any alternative references.
Hi @ROxX, you are not showing the output of a simulation in your terminal output screenshot. It seems like the issue is with the file wall_following.py
, with the message self.cmd.linear.x
.
Have you defined cmd
as a Twist
message? I don’t see that in your IDE screenshot, so the error output would make sense.
I have attached the code. I found this old recommendation - ROS2 Project topics problem - #8 by girishkumar.kannan However using the '/cmd_vel" did not work and ‘cmd_vel’ does not work. Also reset the terminal using the the commands. Here is my code and error message.
There is a bug on line 7 of your code:
# Here, you are assigning the class `Twist` to `self.cmd`
# This is not what you wanted to do
self.cmd = Twist
It should be:
# Here, you assigning an instance of the class `Twist` to `self.cmd`
# This is what you really wanted to do!
self.cmd = Twist()
Please check that you don’t have similar bugs elsewhere.
This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.