I am currently running ROS Melodic on Ubuntu 18.04
I am using these three repos:
git clone -b version2 https://bitbucket.org/theconstructcore/openai_ros.git
git clone -b version2 https://bitbucket.org/theconstructcore/openai_examples_projects.git
git clone -b kinetic-gazebo9 https://bitbucket.org/theconstructcore/parrot_ardrone.git
my_parrotdrone_openai_example package, I have edited:
parrotdrone_openai_qlearn_params_v2.yaml to have the correct
start_qlearning_v2.py to set
catkin_make; source devel/setup.bash I am running:
roslaunch my_parrotdrone_openai_example start_training_v2.launch
From the debug output, it appears to be training. However, there is no gzclient running. What do I need to change to render everything on gazebo?
The parrot simulation launch ha to be changed to use gzclient.
For that you should edit parrot_ardrone/drone_construct/launch/start_world.launch:
Otherwise it wont launch the simulation.
Another faster and easier option is to just launch it in ROSDevelopmenetStudio inside a Melodic ROSject: ROSDS
Hi, what should I change in the launch file? This is the current launch file:
<arg name="world_name" default="$(find drone_construct)/worlds/ardrone_igniteworld.world"/>
<!-- start gzserver and load the map -->
<node name="gazebo" pkg="sjtu_drone" type="start_gzserver" args="$(arg world_name)" respawn="false"/>
Here’s the script the launch file is calling:
#store the argument passed to the script
#find where the 'sjtu_drone' is
pack_path=$(rospack find sjtu_drone)
#export the gazebo pathes
#start the gazebo server
#gzserver $final --verbose -s libplugin_ros_init.so
rosrun gazebo_ros gzserver $final
Right now when running
rosrun sjtu_drone start_gui, the vm goes black. This doesn’t happen for other examples (i.e. turtlebot3), only the parrotdrone example.
ParrotDrone simulation is quite tricky when launching it for gzclient.
Create a launch similar to this:
<node name=“gui” pkg=“sjtu_drone” type=“start_gui” args="$(arg world_name)" respawn=“false”/>
It has given issues locally depending on the ROS version so you will probably have to debug there.
If you have issues, just do it in ROSDS that is ready to work ;).
Yeah it’s super odd how it works on ROSDS but not locally when both is running Melodic/Gazebo 9. I tried:
- replacing the node in start_world.launch with your node -> no ROS master
- appending your node after the node in start_world.launch -> same issue: black screen; crashes vm display (terminal still works)