Go to file
scorpio1 a710520764 Added note to read as raw 2023-01-12 23:15:16 -08:00
README.md Added note to read as raw 2023-01-12 23:15:16 -08:00

README.md

Please read in raw as I figure out how to properly format this

Section 1: Installation To add camera functionality to the spiri drone, copy the code below into the sdf file of the model you are using, before the last line.

    <parent> spiri::base </parent>
    <child> camera_link::link </child>
0 0 0 0 0 0 0.01 2.1733e-06 0 0 2.1733e-06 0 1.8e-07    0 0 0.15 0 0 0         -0.005 0 0 0 0 0                     0.01 0.01 0.01                        0 0 0 1.0       0 0 0 1.0       0.0 0.0 0.0 1.0       0.0 0.0 0.0 1.0            30.0 1.3962634 800 800 R8G8B8 0.02 300 gaussian 0.0 0.007 0 -0.07 0 0 0 0 1.3962634 800 800 R8G8B8 0.02 300 gaussian 0.0 0.007 true 0.0 multisense_sl/camera image_raw camera_info left_camera_optical_frame 0.07 0.0 0.0 0.0 0.0 0.0  

Section 2: Modifying the code This section will go through the code section by section and describe what each part represents

Joint: This joint connects the camera link to the main robot. The parent is the main robot (base) and the child is the camera link

    <parent> spiri::base </parent>
    <child> camera_link::link </child>
Link: This defines the actual camera

Inertial: This defines the mass and intertial properties. The values are set to be small to not change the model much

<inertial>
        <pose>0 0 0 0 0 0</pose>
        <mass>0.01</mass>
        <inertia>
            <ixx>2.1733e-06</ixx>
            <ixy>0</ixy>
            <ixz>0</ixz>
            <iyy>2.1733e-06</iyy>
            <iyz>0</iyz>
            <izz>1.8e-07</izz>
        </inertia>
</inertial>  

Pose: This defines the position where the cameras will be centered

0 0 0.15 0 0 0

Visual: this defines the look of the camera

    -0.005 0 0 0 0 0                     0.01 0.01 0.01                        0 0 0 1.0       0 0 0 1.0       0.0 0.0 0.0 1.0       0.0 0.0 0.0 1.0        

Sensor: This defines how and what the camera outputs. The type multicamera corresponds to a stereo camera

Update rate: This parameter defines the frame rate of the cameras

<update_rate>30.0</update_rate>

Next we define the left camera specific parameters <horizontal_fov>1.3962634</horizontal_fov> 800 800 R8G8B8 0.02 300 gaussian 0.0 0.007 These values still need to be updated to match the camera we are actually using The right camera is similarly defined, along with an offset from the left camera (the pose) 0 -0.07 0 0 0 0 <horizontal_fov>1.3962634</horizontal_fov> 800 800 R8G8B8 0.02 300 gaussian 0.0 0.007 Finally we define some values for ros to use for the topics that we output to, and close everything true 0.0 multisense_sl/camera image_raw camera_info left_camera_optical_frame