Dear friends,
This is my first post on the “discuss.px4” and I would like to get your guidance for the described problem in the thread title.
I try to change the standard_vtol model’s appearance with my custom drone model which I am using “ROS Gazebo PX4” combination that I control my drone from ROS already.
I have designed x5 new models for each wanted “dae files” to use on the default “standard_vtol”. Normally, everything is same that nothing changed - excepted the appearance with my custom design.
However, when I launch the gazebo px4 with ros, everything is still same that the original appearance of “standard_vtol” drone didn’t change with my custom model appearance at all. I even deleted "src>sitl_gazebo>models + PX4-Autopilo>Tools>sitl_gazebo>models + even the "/usr/share/mavlink_sitl_gazebo>models"s standard_vtol meshes dae files but still when I run the program, standard vtol model is generated by the program while it shouldn’t be at all. At the end, I couldn’t figure out why my custom model is not generated at all.
This is my “launch-common3.sh” file’s inside:
cd ~/src/PX4-Autopilot/
DONT_RUN=1 make px4_sitl_default gazebo
source ~/catkin_ws/devel/setup.bash # (optional)
#source Tools/setup_gazebo.bash $(pwd) $(pwd)/build/px4_sitl_default
source ~/src/PX4-Autopilot/Tools/setup_gazebo.bash ~/src/PX4-Autopilot/ ~/src/PX4-Autopilot/build/posix_sitl_default
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$(pwd)
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$(pwd)/Tools/sitl_gazebo
This is my “launch-offb3.sh” file’s inside:
#!/bin/bash
source ./launch-common3.sh
roslaunch offb offb3.launch
This is my “launch-offb3.launch” file’s inside:
<?xml version="1.0"?>
<node name="offb" pkg="offb" type="offb_node3" output="screen"/>
</launch>
This is the “mavros_posix_sitl.launch” from “src/PX4-Autopilot/launch” file’s inside:
<?xml version="1.0"?>
<!-- gazebo configs -->
<arg name="gui" default="true"/>
<arg name="debug" default="false"/>
<arg name="verbose" default="false"/>
<arg name="paused" default="false"/>
<arg name="respawn_gazebo" default="false"/>
<!-- MAVROS configs -->
<arg name="fcu_url" default="udp://:14540@localhost:14557"/>
<arg name="respawn_mavros" default="false"/>
<!-- PX4 configs -->
<arg name="interactive" default="true"/>
<!-- PX4 SITL and Gazebo -->
<include file="$(find px4)/launch/posix_sitl.launch">
<arg name="x" value="$(arg x)"/>
<arg name="y" value="$(arg y)"/>
<arg name="z" value="$(arg z)"/>
<arg name="R" value="$(arg R)"/>
<arg name="P" value="$(arg P)"/>
<arg name="Y" value="$(arg Y)"/>
<arg name="world" value="$(arg world)"/>
<arg name="vehicle" value="$(arg vehicle)"/>
<arg name="sdf" value="$(arg sdf)"/>
<arg name="gui" value="$(arg gui)"/>
<arg name="interactive" value="$(arg interactive)"/>
<arg name="debug" value="$(arg debug)"/>
<arg name="verbose" value="$(arg verbose)"/>
<arg name="paused" value="$(arg paused)"/>
<arg name="respawn_gazebo" value="$(arg respawn_gazebo)"/>
</include>
<!-- MAVROS -->
<include file="$(find mavros)/launch/px4.launch">
<!-- GCS link is provided by SITL -->
<arg name="gcs_url" value=""/>
<arg name="fcu_url" value="$(arg fcu_url)"/>
<arg name="respawn_mavros" value="$(arg respawn_mavros)"/>
</include>
</launch>
This is the Path inside of my gedit ~/.bashrc file:
# PX4 Gazebo Path
# Set the plugin path so Gazebo finds our model and sim
export GAZEBO_PLUGIN_PATH=${GAZEBO_PLUGIN_PATH}:$HOME/src/sitl_gazebo/build
# Set the model path so Gazebo finds the airframes
export GAZEBO_MODEL_PATH=${GAZEBO_MODEL_PATH}:$HOME/src/sitl_gazebo/models
# Disable online model lookup since this is quite experimental and unstable
export GAZEBO_MODEL_DATABASE_URI=""
# Set path to sitl_gazebo repository
export SITL_GAZEBO_PATH=$HOME/src/sitl_gazebo
Right now, I am very confused. I couldn’t find anything related to this problem to solve, or any kind of tutorial related to this subject in the internet. I still want to use the default “standard_vtol” but with my custom drone model appearance. Thus, I will be very glad if you would like to guide me about this too, thank you very much.