1

I start mavros with this code:

roslaunch mavros px4.launch fcu_url:="udp://:14540@192.168.1.36:14557"

then I start gazebo Quadrator with Optical Flow simulation with this code:

make px4_sitl_default gazebo_iris_opt_flow
source ~/catkin_ws/devel/setup.bash    # (optional)
source Tools/simulation/gazebo/setup_gazebo.bash $(pwd) $(pwd)/build/px4_sitl_default
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$(pwd)
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$(pwd)/Tools/simulation/gazebo/sitl_gazebo
roslaunch px4 posix_sitl.launch

when gazebo started I do rostopic list and there is no iris/camera/rgb/image_raw I have a python code which subscribes to iris/camera/rgb/image_raw topic and get Image.msg to find red spot and land. When I ran that code drone goes OFFBOARD mode (so code works) but can not see camera view with rqt and also drone does not land anywhere. So what is the problem?

I deleted PX4 and gazebo and reinstalled them nothing happened. I tried another topics that include camera in their name and also did not work.

Combinacijus
  • 405
  • 2
  • 8
MTO
  • 41
  • 5
  • What if you first launch gazebo and then px4.launch? Also you need to source ros and workspace on every new terminal you open before executing ros commands. Sourcing example for Noetic and catkin_ws workspace: `source /opt/ros/noetic/setup.bash` and `source ~/catkin_ws/devel/setup.bash` – Combinacijus Mar 11 '23 at 20:10

1 Answers1

0

I reinstalled ubuntu and ROS. After that I reconfigured iris.sdf and my problem was solved.

MTO
  • 41
  • 5