From 353a20f81580b6f81e882b962d343758f888b3ce Mon Sep 17 00:00:00 2001 From: scorpio1 Date: Thu, 12 Jan 2023 23:13:55 -0800 Subject: [PATCH] Added of code --- README.md | 203 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 203 insertions(+) diff --git a/README.md b/README.md index e69de29..a03c396 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,203 @@ +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. + + + + spiri::base + camera_link::link + + + + + + + 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 + + + spiri::base + camera_link::link + +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 + + + 0 0 0 0 0 0 + 0.01 + + 2.1733e-06 + 0 + 0 + 2.1733e-06 + 0 + 1.8e-07 + +    +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 + +30.0 + +Next we define the left camera specific parameters + + 1.3962634 + + 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 + 1.3962634 + + 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 + + + \ No newline at end of file