Turtlebot3 does not move autonomously in Gazebo
I am trying out the turtlebot tutorial from this website https://automaticaddison.com/how-to-l...
when running this command roslaunch turtlebot3_gazebo turtlebot3_simulation.launch, my turtlebot3 does not move as expected.
After digging some threads in github, I added this line "turtlebot3_drive.init(); in the main function of "turtlebot3_drive.cpp" file
int main(int argc, char* argv[])
{
ros::init(argc, argv, "turtlebot3_drive");
Turtlebot3Drive turtlebot3_drive;
turtlebot3_drive.init(); //the line that I added
ros::Rate loop_rate(125);
while (ros::ok())
{
turtlebot3_drive.controlLoop();
ros::spinOnce();
loop_rate.sleep();
}
return 0;
}
The problem still persists, may anyone help me with it?