Skip to content

Commit

Permalink
Deployed bc6a1af with MkDocs version: 1.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
WouterJansen committed Jan 17, 2024
1 parent 26fd2cc commit a066604
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions image_apis/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ <h4 id="quick-tips">Quick Tips</h4>
</ul>
<h2 id="ready-to-run-complete-examples">Ready to Run Complete Examples</h2>
<h3 id="python_2">Python</h3>
<p>For a more complete ready to run sample code please see <a href="https://github.com/Microsoft/AirSim/tree/master/PythonClient//multirotor/hello_drone.py">sample code in AirSimClient project</a> for multirotors or <a href="https://github.com/Microsoft/AirSim/tree/master/PythonClient//car/hello_car.py">HelloCar sample</a>. This code also demonstrates simple activities such as saving images in files or using <code>numpy</code> to manipulate images.</p>
<p>For a more complete ready to run sample code please see <a href="https://github.com/Cosys-Lab/Cosys-AirSim/tree/main/PythonClient//multirotor/hello_drone.py">sample code in AirSimClient project</a> for multirotors or <a href="https://github.com/Cosys-Lab/Cosys-AirSim/tree/main/PythonClient//car/hello_car.py">HelloCar sample</a>. This code also demonstrates simple activities such as saving images in files or using <code>numpy</code> to manipulate images.</p>
<h2 id="available-cameras">Available Cameras</h2>
<h3 id="car">Car</h3>
<p>The cameras on car can be accessed by following names in API calls: <code>front_center</code>, <code>front_right</code>, <code>front_left</code>, <code>fpv</code> and <code>back_center</code>. Here FPV camera is driver's head position in the car.</p>
Expand All @@ -388,7 +388,7 @@ <h2 id="computer-vision-mode_1">"Computer Vision" Mode</h2>
&quot;SimMode&quot;: &quot;ComputerVision&quot;
}
</code></pre>
<p><a href="https://github.com/Microsoft/AirSim/tree/master/PythonClient//computer_vision/cv_mode.py">Here's the Python code example</a> to move camera around and capture images.</p>
<p><a href="https://github.com/Cosys-Lab/Cosys-AirSim/tree/main/PythonClient//computer_vision/cv_mode.py">Here's the Python code example</a> to move camera around and capture images.</p>
<p>This mode was inspired from <a href="http://unrealcv.org/">UnrealCV project</a>.</p>
<h3 id="setting-pose-in-computer-vision-mode">Setting Pose in Computer Vision Mode</h3>
<p>To move around the environment using APIs you can use <code>simSetVehiclePose</code> API. This API takes position and orientation and sets that on the invisible vehicle where the front-center camera is located. All rest of the cameras move along keeping the relative position. If you don't want to change position (or orientation) then just set components of position (or orientation) to floating point nan values. The <code>simGetVehiclePose</code> allows to retrieve the current pose. You can also use <code>simGetGroundTruthKinematics</code> to get the quantities kinematics quantities for the movement. Many other non-vehicle specific APIs are also available such as segmentation APIs, collision APIs and camera APIs.</p>
Expand All @@ -403,7 +403,7 @@ <h2 id="camera-apis">Camera APIs</h2>
</code></pre>
<h3 id="gimbal">Gimbal</h3>
<p>You can set stabilization for pitch, roll or yaw for any camera <a href="../settings/#gimbal">using settings</a>.</p>
<p>Please see <a href="https://github.com/Microsoft/AirSim/tree/master/PythonClient//computer_vision/cv_mode.py">example usage</a>.</p>
<p>Please see <a href="https://github.com/Cosys-Lab/Cosys-AirSim/tree/main/PythonClient//computer_vision/cv_mode.py">example usage</a>.</p>
<h2 id="changing-resolution-and-camera-parameters">Changing Resolution and Camera Parameters</h2>
<p>To change resolution, FOV etc, you can use <a href="../settings/">settings.json</a>. For example, below addition in settings.json sets parameters for scene capture and uses "Computer Vision" mode described above. If you omit any setting then below default values will be used. For more information see <a href="../settings/">settings doc</a>. If you are using stereo camera, currently the distance between left and right is fixed at 25 cm.</p>
<pre><code class="language-json">{
Expand Down Expand Up @@ -467,8 +467,8 @@ <h3 id="segmentation">Segmentation</h3>
<p>To retrieve the color map to know which color is assign to each color index you can use:</p>
<pre><code class="language-python">colorMap = client.simGetSegmentationColorMap()
</code></pre>
<p>An example can be found in <a href="../PythonClient/segmentation/segmentation_test.py">segmentation_test.py</a>.
For a script that generates a full list of objects and their associated color, please see the script <a href="../PythonClient/segmentation/segmentation_generate_list.py">segmentation_generate_list.py</a>.</p>
<p>An example can be found in <a href="https://github.com/Cosys-Lab/Cosys-AirSim/tree/main/PythonClient/segmentation/segmentation_test.py">segmentation_test.py</a>.
For a script that generates a full list of objects and their associated color, please see the script <a href="https://github.com/Cosys-Lab/Cosys-AirSim/tree/main/PythonClient/segmentation/segmentation_generate_list.py">segmentation_generate_list.py</a>.</p>
<h4 id="how-to-find-mesh-names">How to Find Mesh names?</h4>
<p>To get desired ground truth segmentation you will need to know the names of the meshes in your Unreal environment. To do this, you can use the API:</p>
<pre><code class="language-python">currentObjectList = client.simListInstanceSegmentationObjects()
Expand All @@ -485,7 +485,7 @@ <h4 id="more-information">More information</h4>
<h3 id="infrared">Infrared</h3>
<p>Currently, this is just a map from object ID to grey scale 0-255. So any mesh with object ID 42 shows up with color (42, 42, 42). Please see <a href="#segmentation">segmentation section</a> for more details on how to set object IDs. Typically noise setting can be applied for this image type to get slightly more realistic effect. We are still working on adding other infrared artifacts and any contributions are welcome.</p>
<h2 id="example-code">Example Code</h2>
<p>A complete example of setting vehicle positions at random locations and orientations and then taking images can be found in <a href="https://github.com/Microsoft/AirSim/tree/master/Examples/DataCollection/StereoImageGenerator.hpp">GenerateImageGenerator.hpp</a>. This example generates specified number of stereo images and ground truth disparity image and saving it to <a href="../pfm/">pfm format</a>.</p>
<p>A complete example of setting vehicle positions at random locations and orientations and then taking images can be found in <a href="https://github.com/Cosys-Lab/Cosys-AirSim/tree/main/Examples/DataCollection/StereoImageGenerator.hpp">GenerateImageGenerator.hpp</a>. This example generates specified number of stereo images and ground truth disparity image and saving it to <a href="../pfm/">pfm format</a>.</p>

</div>
</div><footer>
Expand Down
Binary file modified sitemap.xml.gz
Binary file not shown.

0 comments on commit a066604

Please sign in to comment.