caochao39 / aerial_navigation_development_environment

Leveraging system development and robot deployment for aerial autonomous navigation.
312 stars 76 forks source link

AirSim Environments #9

Open ashton-n opened 8 months ago

ashton-n commented 8 months ago

Has any one managed to get AirSim environments working?

It seems local_planner doesnt work in these evironments because when I move the quadrotor in smart joystick mode the precomputed trajectories are not shown in rviz and obstacale avoidance does not work (I can fly through the objects).

I have tried this in the latest version of AirSim as well as the Colosseum fork both with the same problem.

In Gazebo everything works as shown in this repos readme.

I am using ubuntu 20.04 and ROS noetic. I am using the melodic-noetic branch.

I have set 'autonomyMode = true' in 'src/local_planner/launch/local_planner_indoor.launch' and in 'src/local_planner/launch/local_planner_outdoor.launch'.

If someone can point me in the right direction it would be very much appriciated.

ChiGon commented 7 months ago

I also encountered the same problem. Can your waypoint flight mode work properly? I tried to give a waypoint, although the UAV will slowly turn towards the target point, it will remain stationary at the initial point.I also checked my auto_mode too.

ashton-n commented 7 months ago

The same happens on my setup. I did manage to figure out a few things though. If you press the right trigger [manual mode] and then press down on the right joystick for about 1 second, then release all buttons. As the quadrotor moves to its set point after overshooting it, Rviz shows the precomputed paths in a similar way as when you run it in Gazebo.

Once you see the paths, press down on the left joystick and up on the right joystck, the quadrotor then starts to move in smart joystick mode. You may have to to try it a few times to get it to work. Once it is in smart joystick mode you can also press the left trigger to set it to waypoint mode. Then the quadrotor goes to the position that is passed in src/local_planner/launch/local_planner_outdoor.launch (goalX, goalY, goalZ).

If you run the waypoint example and then manage to get the quadrotor into waypoint mode, then I think it should follow the co-codinates from the waypoints.ply file.

I have been trying to fix this so that it works as discribed in the readme...it seems to be something to do with the modes, the /auto_mode topic changes the autoAdjust mode state when an obstacle needs to be avoided. But it seems that the movement commands for the smart joystick mode are then not being picked up or being overridden somewhere. If I manage to fix it I will create a PR, but no luck yet.

Wangben1019 commented 1 month ago

Hi, have you made any new progress in your work? I have encountered the same problem as you.