Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Change camera orientation

Referring to the attached figure, How can I change the camera orientation so that the beer can will be visible when placed to the front of the robot?

image description

Change camera orientation

Referring to the attached figure, How can I change the camera orientation so that the beer can will be visible when placed to the front of the robot?

image description

I have fixed the orientation by acting on the camera_joint rpy, as shown in the following:

<joint name="camera_joint" type="fixed"> <origin xyz="${2*camera_link} ${height + 2*axel_offset} 0" rpy="0 0 1.57"/> <parent link="link4"/> <child link="camera_link"/> </joint>

<link name="camera_link"> <collision> <origin xyz="0 ${camera_link + axel_offset} 0" rpy="0 0 0"/> <geometry> <box size="${camera_link} ${camera_link} ${camera_link}"/> </geometry> </collision>

<visual>
  <origin xyz="0 ${camera_link + axel_offset} 0" rpy="0 0 0"/>
  <geometry>
<box size="${camera_link} ${camera_link} ${camera_link}"/>
  </geometry>
  <material name="red"/>
</visual>

<inertial>
  <mass value="1e-5" />
  <origin xyz="0 ${camera_link + axel_offset} 0" rpy="0 0 0"/>
  <inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6" />
</inertial>

</link>

however, now the camera view seems obstructed by an edge of the camera box. image description

Change camera orientation

Referring to the attached figure, How can I change the camera orientation so that the beer can will be visible when placed to the front of the robot?

image description

I have fixed the orientation by acting on the camera_joint rpy, as shown in the following:

 <joint name="camera_joint" type="fixed">
 <origin xyz="${2*camera_link} ${height + 2*axel_offset} 0" rpy="0 0 1.57"/>
 <parent link="link4"/>
 <child link="camera_link"/>
 

</joint>

<link name="camera_link"> <collision> <origin xyz="0 ${camera_link + axel_offset} 0" rpy="0 0 0"/> <geometry> <box size="${camera_link} ${camera_link} ${camera_link}"/> </geometry> </collision>

<visual>
  <origin xyz="0 ${camera_link + axel_offset} 0" rpy="0 0 0"/>
  <geometry>
<box size="${camera_link} ${camera_link} ${camera_link}"/>
  </geometry>
  <material name="red"/>
</visual>

<inertial>
  <mass value="1e-5" />
  <origin xyz="0 ${camera_link + axel_offset} 0" rpy="0 0 0"/>
  <inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6" />
</inertial>

</link>

however, now the camera view seems obstructed by an edge of the camera box. image description

Change camera orientation

Referring to the attached figure, How can I change the camera orientation so that the beer can will be visible when placed to the front of the robot?

image description

I have fixed the orientation by acting on the camera_joint rpy, as shown in the following:

  <joint name="camera_joint" type="fixed">
<origin xyz="${2*camera_link} ${height + 2*axel_offset} 0" rpy="0 0 1.57"/>
<parent link="link4"/>
<child link="camera_link"/>
  </joint>

</joint>

<link name="camera_link"> <collision> <origin xyz="0 ${camera_link + axel_offset} 0" rpy="0 0 0"/> <geometry> <box size="${camera_link} ${camera_link} ${camera_link}"/> </geometry> </collision>

<visual>
  <origin xyz="0 ${camera_link + axel_offset} 0" rpy="0 0 0"/>
  <geometry>
<box size="${camera_link} ${camera_link} ${camera_link}"/>
  </geometry>
  <material name="red"/>
</visual>

<inertial>
  <mass value="1e-5" />
  <origin xyz="0 ${camera_link + axel_offset} 0" rpy="0 0 0"/>
  <inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6" />
</inertial>

</link>

however, now the camera view seems obstructed by an edge of the camera box. image description

Change camera orientation

Referring to the attached figure, How can I change the camera orientation so that the beer can will be visible when placed to the front of the robot?

image description

I have fixed the orientation by acting on the camera_joint rpy, as shown in the following:

  <joint name="camera_joint" type="fixed">
<origin xyz="${2*camera_link} ${height + 2*axel_offset} 0" rpy="0 0 1.57"/>
<parent link="link4"/>
<child link="camera_link"/>
  </joint>

<link name="camera_link"> <collision> <origin xyz="0 ${camera_link + axel_offset} 0" rpy="0 0 0"/> <geometry> <box size="${camera_link} ${camera_link} ${camera_link}"/> </geometry> </collision>

<visual>
  <origin xyz="0 ${camera_link + axel_offset} 0" rpy="0 0 0"/>
  <geometry>
<box size="${camera_link} ${camera_link} ${camera_link}"/>
  </geometry>
  <material name="red"/>
</visual>

<inertial>
  <mass value="1e-5" />
  <origin xyz="0 ${camera_link + axel_offset} 0" rpy="0 0 0"/>
  <inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6" />
</inertial>

</link>

however, now the camera view seems obstructed by an edge of the camera box. image description

Change camera orientation

Referring to the attached figure, How can I change the camera orientation so that the beer can will be visible when placed to the front of the robot?

image description

I have fixed the orientation by acting on the camera_joint rpy, as shown in the following:

  <joint name="camera_joint" type="fixed">
 <origin xyz="${2*camera_link} ${height + 2*axel_offset} 0" rpy="0 0 1.57"/>
 <parent link="link4"/>
 <child link="camera_link"/>
  </joint>

<!-- Camera --> <link name="camera_link"> <collision> <origin xyz="0 ${camera_link + axel_offset} 0" rpy="0 0 0"/> <geometry> <box size="${camera_link} ${camera_link} ${camera_link}"/> </geometry> </collision>

</collision>

    <visual>
   <origin xyz="0 ${camera_link + axel_offset} 0" rpy="0 0 0"/>
   <geometry>
 <box size="${camera_link} ${camera_link} ${camera_link}"/>
   </geometry>
   <material name="red"/>
 </visual>

 <inertial>
   <mass value="1e-5" />
   <origin xyz="0 ${camera_link + axel_offset} 0" rpy="0 0 0"/>
   <inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6" />
 </inertial>
  </link>

</link>

however, now the camera view seems obstructed by an edge of the camera box. image description