PX4 plugin setup - Aeroclub-IITM/Plugins_setup GitHub Wiki
In /home/username/src/Firmware/Tools/sitl_gazebo/models/rotors_description/urdf/
Open to edit iris_base.xacro. Before the , I added the following bloc of code:
<!-- Mount a camera -->
<xacro:camera_macro
`namespace="${namespace}"`
`parent_link="base_link"`
`camera_suffix="red_iris"`
`frame_rate="30.0"`
`horizontal_fov="1.3962634"`
`image_width="800"`
`image_height="800"`
`image_format="R8G8B8"`
`min_distance="0.02"`
`max_distance="300"`
`noise_mean="0.0"`
`noise_stddev="0.007"`
`enable_visual="1"`
`>`
`<box size="0.05 0.05 0.05" />`
`<origin xyz="0 0 -0.07" rpy="0 1.57079 0"/>`
</xacro:camera_macro>
Open a terminal,
cd Firmware
DONT_RUN=1 make px4_sitl_default gazebo To make change permanent
Now launching px4 sitl with roslaunch, publishes images to topic.
For displaying the camera output we can use
rosrun rqt_image_view rqt_image_view (Through rqt)
rosrun image_view image_view image:=<topic name>
For getting live video feed from camera and process it,
To setup darknet_ros for object classification.