disaster-robotics-proalertas / usv_sim_lsa

Unmanned Surface Vehicle simulation on Gazebo with water current and winds
Apache License 2.0
325 stars 105 forks source link

Simulation not navigating #41

Open codymarquardt opened 4 years ago

codymarquardt commented 4 years ago

I have successfully run the simulation using the command sequence:

source install_isolated/setup.bash roslaunch usv_sim airboat_scenario1.launch parse:=true roslaunch usv_sim airboat_scenario1.launch parse:=false

From this point, I had to open another terminal and run the command:

rosservice call /gazebo/unpause_physics "{}"

At this point, waves begin moving and the boat reacts to the waves/current, but the boat does not navigate between the buoys. From the documentation, it seemed to me that the navigation was built into this launch file. Am I mistaken?

Is there another command I need to run to make the boat navigate?

Any help would be appreciated!!

sandeepwadhwa-ai commented 3 years ago

I am also not able to get the boat to navigate. Don't know how to fix that. Was anybody able to do it?

jasonjabbour commented 2 years ago

same is happening to me, did you all find a solution?

codymarquardt commented 2 years ago

Sorry guys, never got a solution to this and have moved on to other things

jasonjabbour commented 2 years ago

for anyone looking for a solution in the future, try using different boat types and different scenarios. You should also start the ROS master node in a different terminal! This worked for me:

Terminal 1: Start the Master ROS node roscore

Terminal 2: Source the environment source install_isolated/setup.bash

Produce the spawner launch file (this command will end in red text, don't worry about it. The purpose of this command is to produce a new launch file within the usv_sim/launch/scenarios_launchs/ directory) roslaunch usv_sim rudderboat_scenario_j1.launch parse:=true

Start the simulation roslaunch usv_sim rudderboat_scenario_j1.launch parse:=false

Terminal 3: Unpause gazebo: rosservice call /gazebo/unpause_physics "{}"

You can also unpause gazebo using python. Take a look within the navigation scripts: https://github.com/disaster-robotics-proalertas/usv_sim_lsa/blob/fbd3218d976a1686abdaeaadf6e31e98d6301468/usv_navigation/scripts/patrol_pid_scene_j1.py#L47

You can explore the different scenarios and boat types by following the same process for other scripts within this directory: https://github.com/disaster-robotics-proalertas/usv_sim_lsa/tree/master/usv_sim/launch/scenarios_launchs

Hope this helps someone in the future!