ETHZ-RobotX / SuperMegaBot

Main repository of the SuperMegaBot
18 stars 19 forks source link

SMB simulation issues #37

Closed JALin2000 closed 12 months ago

JALin2000 commented 12 months ago

Hi,

I run ROS Noetic on Ubuntu 20.04 and I choose to configure the SMB Core Software. However I meet some problems in the simulation part. They might seem silly... But I would be more than grateful if somebody can help me with these :)

When I run

roslaunch smb_gazebo sim.launch launch_gazebo_gui:=true world:=WaA

and

roslaunch smb_gazebo sim.launch launch_gazebo_gui:=true keyboard_teleop:=true

# in another command tab, with ros-noetic-teleop-twist-keyboard already installed
rosrun teleop_twist_keyboard teleop_twist_keyboard.py

to try to control the robot with the keyboard, (1) The world in RViz is not loaded, (2) The keyboard control is not activated.

Some relative screen shots are as follows: Screenshot from 2023-07-06 15-03-56 Screenshot from 2023-07-06 15-05-57

I think the problem of the world not loaded is due to the missing model.config.

However, I have no idea why the keyboard control is not activated. Actually it just gets stuck after I press enter at the end of the command line, no matter the simulation is on or not. I also check the rosnode after it gets stuck, but no keyboard control related node is present. Moreover, I try the fix in issue #24 , but it doesn't work for me...

Thanks in advance if somebody can help me with this!

Best, Junan

JALin2000 commented 12 months ago

Also, in the "Autonomous Navigation in Simulation" part, I neither get the map of the obstacles in RViz...

daBaret commented 12 months ago

Hi Junan, thanks for reaching out. Could you give a look at issue #33 ? Let me know if it works.

Have a nice day, Davide

JALin2000 commented 12 months ago

Hello Davide, I have checked that issue before, but it didn't help. These are some related results: Screenshot from 2023-07-06 16-56-35 Screenshot from 2023-07-06 16-56-58 Screenshot from 2023-07-06 16-57-10 Screenshot from 2023-07-06 16-57-13

The third picture is the result of running

roslaunch smb_gazebo sim.launch launch_gazebo_gui:=true world:=planner_tutorial tracking_camera:=true

While the fourth is the result of running

roslaunch smb_navigation navigate2d_ompl.launch sim:=true global_frame:=tracking_camera_odom
daBaret commented 12 months ago

Probably you have to wait after launching smb_gazebo. The first time it takes quite long.

It looks like your simulation is not starting properly. Could you try to catkin clean and to build smb_gazebo again?

JALin2000 commented 12 months ago

Probably you have to wait after launching smb_gazebo. The first time it takes quite long.

It looks like your simulation is not starting properly. Could you try to catkin clean and to build smb_gazebo again?

I wait before running smb_navigation, and catkin clean and rebuild smb_gazebo, but things go same as before. I think probably there are some internal configuration bugs, which are really difficult to find... Maybe it would be better to debug onsite later :) Anyway thanks for your help!

erencanbulut commented 12 months ago

Hello, I am one of RobotX Summer School participants.

Sorry to interrupt the conversation. I had the same issue and solved it. Just wanted to share:

After terminate the current gazebo simulation, run the following command to check if there are any existing Gazebo processes running: ps aux | grep gzserver If you see any processes listed, then, you can use this command to terminate them: killall -9 gzserver

JALin2000 commented 12 months ago

Hello, I am one of RobotX Summer School participants.

Sorry to interrupt the conversation. I had the same issue and solved it. Just wanted to share:

After terminate the current gazebo simulation, run the following command to check if there are any existing Gazebo processes running: ps aux | grep gzserver If you see any processes listed, then, you can use this command to terminate them: killall -9 gzserver

Thanks a lot for your reply! The problem in my case is the conda environment. I finally stop using conda virtualenv and re-configure the workspace, and the problem just automatically disappears.