Skip to content

Commit

Permalink
Merge branch 'master' into hack/force_sensor
Browse files Browse the repository at this point in the history
  • Loading branch information
maxb91 committed Nov 18, 2021
2 parents 728407a + cd813b7 commit 67694ce
Show file tree
Hide file tree
Showing 9 changed files with 186 additions and 128 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Installation Instructions - Ubuntu 16.04 with ROS Kinetic
$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu `lsb_release -sc` main" > /etc/apt/sources.list.d/ros-latest.list'
$ wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
$ sudo apt-get update
$ sudo apt-get install ros-kinetic-desktop-full ros-kinetic-joy ros-kinetic-octomap-ros ros-kinetic-mavlink python-wstool python-catkin-tools protobuf-compiler libgoogle-glog-dev ros-kinetic-control-toolbox
$ sudo apt-get install ros-kinetic-desktop-full ros-kinetic-joy ros-kinetic-octomap-ros ros-kinetic-mavlink python-wstool python-catkin-tools protobuf-compiler libgoogle-glog-dev ros-kinetic-control-toolbox ros-kinetic-mavros
$ sudo rosdep init
$ rosdep update
$ source /opt/ros/kinetic/setup.bash
Expand Down
1 change: 0 additions & 1 deletion rotors_demos.rosinstall
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
- git: {local-name: asctec_mav_framework, uri: 'https://github.com/ethz-asl/asctec_mav_framework.git'}
- git: {local-name: ethzasl_msf, uri: 'https://github.com/ethz-asl/ethzasl_msf.git'}
- git: {local-name: mav_comm, uri: 'https://github.com/ethz-asl/mav_comm.git'}
- git: {local-name: rotors_simulator, uri: 'https://github.com/ethz-asl/rotors_simulator.git'}
- git: {local-name: rotors_simulator_demos, uri: 'https://github.com/ethz-asl/rotors_simulator_demos.git'}
1 change: 0 additions & 1 deletion rotors_description/urdf/component_snippets.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
-->

<robot xmlns:xacro="http://ros.org/wiki/xacro">
<xacro:property name="pi" value="3.14159265359" />

<!-- Macro to add logging to a bag file. -->
<xacro:macro name="bag_plugin_macro"
Expand Down
20 changes: 2 additions & 18 deletions rotors_description/urdf/pmd_monstar.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,6 @@
<robot name="$(arg mav_name)" xmlns:xacro="http://ros.org/wiki/xacro">
<xacro:include filename="$(find rotors_description)/urdf/component_snippets.xacro" />

<!-- Note that whenever possible, values from Realsense D435 were used.
See Intel Document 337029-004: Intel RealSense TM D400 Series Product Family Datasheet.
https://www.intel.com/content/dam/support/us/en/documents/emerging-technologies/intel-realsense-technology/Intel-RealSense-D400-Series-Datasheet.pdf
Here, RGBD camera baselink frame corresponds to the left IR camera center, which is also the camera
the sensor is calibrated to in real life and the point cloud is registered to.
-->

<link name="rgbd_camera/base_link">
<collision>
<origin xyz="0 -0.0175 0" rpy="0 0 0" />
Expand All @@ -35,7 +27,6 @@

</joint>



<!-- Define Macro to add a depth camera using noisy depth plugin -->
<xacro:macro name="rgbd_sensor_depth_macro"
Expand Down Expand Up @@ -71,7 +62,7 @@
<!-- Call rgb sensor macro-->

<gazebo reference="${namespace}/camera_${camera_suffix}_link">
<sensor type="depth" name="${namespace}_camera_{camera_suffix}">
<sensor type="depth" name="${namespace}_camera_${camera_suffix}">
<always_on>true</always_on>
<update_rate>${frame_rate}</update_rate>
<camera>
Expand All @@ -86,7 +77,7 @@
<far>${max_range}</far>
</clip>
</camera>
<plugin name="${namespace}_camera_{camera_suffix}" filename="librotors_gazebo_noisydepth_plugin.so">
<plugin name="${namespace}_camera_${camera_suffix}" filename="librotors_gazebo_noisydepth_plugin.so">
<robotNamespace>${namespace}</robotNamespace>
<alwaysOn>true</alwaysOn>
<baseline>${baseline}</baseline>
Expand Down Expand Up @@ -153,13 +144,6 @@

</xacro:macro>

<!-- Call depth sensor macro
Realsense values -
91.2 Deg Horizontal FOV
848x480 Optimal depth resolution
w 195 mm minimium-z depth
5 cm baseline.
-->
<xacro:rgbd_sensor_depth_macro
namespace="${namespace}/rgbd" parent_link="rgbd_camera/base_link_gazebo"
camera_suffix="depth"
Expand Down
3 changes: 2 additions & 1 deletion rotors_gazebo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ add_definitions(-std=c++11)
# We need Gazebo version >= 3.0.0 to generate iris.sdf file
# (gz sdf ... command needs to be available)
find_package(gazebo REQUIRED)
find_package(PythonInterp REQUIRED)

if(${gazebo_VERSION_MAJOR} GREATER 2)
message(STATUS "Building iris.sdf.")
Expand All @@ -26,7 +27,7 @@ if(${gazebo_VERSION_MAJOR} GREATER 2)
add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/models/iris/iris.sdf
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMAND rm -f ${CMAKE_CURRENT_SOURCE_DIR}/models/iris/iris.sdf
COMMAND python ${scripts_dir}/xacro.py -o ${rotors_description_dir}/urdf/iris_base.urdf ${rotors_description_dir}/urdf/iris_base.xacro enable_mavlink_interface:=${enable_mavlink_interface} enable_ground_truth:=${enable_ground_truth} enable_wind:=${enable_wind} enable_logging:=${enable_logging} rotors_description_dir:=${rotors_description_dir}
COMMAND ${PYTHON_EXECUTABLE} ${scripts_dir}/xacro.py -o ${rotors_description_dir}/urdf/iris_base.urdf ${rotors_description_dir}/urdf/iris_base.xacro enable_mavlink_interface:=${enable_mavlink_interface} enable_ground_truth:=${enable_ground_truth} enable_wind:=${enable_wind} enable_logging:=${enable_logging} rotors_description_dir:=${rotors_description_dir}
COMMAND gz sdf -p ${rotors_description_dir}/urdf/iris_base.urdf >> ${CMAKE_CURRENT_SOURCE_DIR}/models/iris/iris.sdf
COMMAND rm -f ${rotors_description_dir}/urdf/iris_base.urdf
DEPENDS ${rotors_description_dir}/urdf/iris.xacro
Expand Down
Loading

0 comments on commit 67694ce

Please sign in to comment.