-
Notifications
You must be signed in to change notification settings - Fork 342
Open
Description
Hello,
I'm trying to use the camera sensor with the orthographic lens to generate a 2D map for navigation.
However, I can't change my lens type. It always stays stereographic.
Every value I write in the field is ignored.
The relevant SDF Parts look like this:
`
<physics type="ode">
<max_step_size>0.003</max_step_size>
<real_time_factor>1.0</real_time_factor>
</physics>
<plugin name="gz::sim::systems::Physics" filename="libgz-sim8-physics-system.so"/>
<plugin name="gz::sim::systems::UserCommands" filename="libgz-sim8-user-commands-system.so"/>
<plugin name="gz::sim::systems::SceneBroadcaster" filename="libgz-sim8-scene-broadcaster-system.so"/>
<plugin name="gz::sim::systems::Sensors" filename="libgz-sim8-sensors-system.so">
<render_engine>ogre2</render_engine>
</plugin>
<model name="My_Ortho_Cam">
<pose>170 -200 400 0 1.57 0</pose>
<static>true</static>
<link name="camera_link">
<sensor name="my_camera" type="camera">
<topic>/map_camera</topic>
<update_rate>1</update_rate>
<always_on>1</always_on>
<visualize>true</visualize>
<camera>
<save enabled="true">
<path>/home/ros/camera</path>
</save>
<image>
<width>10000</width>
<height>10000</height>
<format>R8G8B8</format>
</image>
<clip>
<near>0.1</near>
<far>1000</far>
</clip>
<lens>
<type>orthographic</type>
</lens>
</camera>
</sensor>
</link>
</model>
`
I noticed that if I check my camera model with gz model -l -m My_Ortho_Cam -s all my properties are correctly set, except the lens type.
The output of said gz model -l -m My_Ortho_Cam -s
`
Requesting state for world [warehouse]...
- Link [5]
- Name: camera_link
- Parent: My_Ortho_Cam [4]
- Mass (kg): 1.000000
- Inertial Pose [ XYZ (m) ] [ RPY (rad) ]:
[0.000000 0.000000 0.000000]
[0.000000 -0.000000 0.000000] - Inertial Matrix (kg.m^2):
[1.000000 0.000000 0.000000]
[0.000000 1.000000 0.000000]
[0.000000 0.000000 1.000000] - Pose [ XYZ (m) ] [ RPY (rad) ]:
[0.000000 0.000000 0.000000]
[0.000000 -0.000000 0.000000] - Sensor [6]
- Name: my_camera
- Parent: My_Ortho_Cam [4]
- Pose [ XYZ (m) ] [ RPY (rad) ]:
[0.000000 0.000000 0.000000]
[0.000000 -0.000000 0.000000] - Horizontal field of view (rad): 1.047
- Image width (px): 10000
- Image height (px): 10000
- Near clip (m): 0.1
- Far clip (m): 1000
- Pixel format: RGB_INT8
- Save frames: 1
- Save frames path: /home/ros/camera
- Image noise:
- Mean: 0
- Bias mean: 0
- Standard deviation: 0
- Bias standard deviation: 0
- Precision: 0
- Dynamic bias standard deviation: 0
- Dynamic bias correlation time (s): 0
- Distortion K1: 0
- Distortion K2: 0
- Distortion K3: 0
- Distortion P1: 0
- Distortion P2: 0
- Distortion center: 0.5 0.5
- Lens type: stereographic
- Lens scale to horizontal field of view (rad): 1
- Lens C1: 1
- Lens C2: 1
- Lens C3: 0
- Lens focal length (m): 1
- Lens function: tan
- Lens cutoff angle (rad): 1.5708
- Lens texture size: 256
- Lens intrinsics Fx: 277
- Lens intrinsics Fy: 277
- Lens intrinsics Cx: 160
- Lens intrinsics Cy: 120
- Lens intrinsics skew: 0
- Visibility mask: 4294967295
`
I'm unsure if it's because I did something wrong with the implementation of the SDF-file, or gazebo does not support different lens types, or the rendering engine does not support it.
Thanks for your help and input in advance.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Inbox