Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dummy inertias for Gazebo simulation #339

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions microstrain_inertial_description/urdf/cv7.urdf.xacro
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro">
<xacro:macro name="dummy_inertia">
<inertial>
<mass value="0.001" />
<inertia ixx="0.0001" ixy="0.0" ixz="0.0"
iyy="0.0001" iyz="0.0"
izz="0.0001" />
</inertial>
</xacro:macro>

<xacro:macro name="cv7" params="name parent *origin">
<material name="cv7_material">
<color rgba="${80/255} ${81/255} ${85/255} 1" />
Expand All @@ -13,9 +22,11 @@
</geometry>
<material name="cv7_material"/>
</visual>
<xacro:dummy_inertia/>
</link>

<link name="${name}">
<xacro:dummy_inertia/>
</link>

<!-- This joint handles the center of the CV7, but measurements will not be produced WRT to this, it is just easier to place on robots -->
Expand Down
17 changes: 10 additions & 7 deletions microstrain_inertial_driver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,17 @@ find_package(catkin REQUIRED COMPONENTS
microstrain_inertial_msgs
)

# GeographicLib
include(FetchContent)
FetchContent_Declare(
GeographicLib
GIT_REPOSITORY https://github.com/geographiclib/geographiclib.git
GIT_TAG v2.3
)
FetchContent_MakeAvailable(GeographicLib)

# Find some less ROS-y packages
list(APPEND CMAKE_MODULE_PATH "/usr/share/cmake/geographiclib/")
find_package(Eigen3 REQUIRED)
find_package(GeographicLib REQUIRED)

# We want to use the static library for libgeographic, but it doesn't seem to find it for us, so substitute it here
string(REGEX REPLACE "[.]so[^\\/\\s]*$" ".a" GeographicLib_LIBRARIES ${GeographicLib_LIBRARIES})

###################################
## catkin specific configuration ##
Expand Down Expand Up @@ -143,7 +147,6 @@ include_directories(
${COMMON_DIR}/include
${catkin_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
${GeographicLib_INCLUDE_DIRS}
)

set(LIB_SRC_FILES
Expand Down Expand Up @@ -224,7 +227,7 @@ target_link_libraries(${PROJECT_NAME}
target_link_libraries(${PROJECT_NAME}_node
${PROJECT_NAME}
${catkin_LIBRARIES}
${GeographicLib_LIBRARIES}
GeographicLib
)

#############
Expand Down
4 changes: 2 additions & 2 deletions microstrain_inertial_driver/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
<depend>nmea_msgs</depend>
<depend>rtcm_msgs</depend>
<depend>tf2_geometry_msgs</depend>

<depend>microstrain_inertial_msgs</depend>

<!-- Static or header only library deps -->
<build_depend>eigen</build_depend>
<build_depend>geographiclib</build_depend>
<!-- <build_depend>geographiclib</build_depend> -->

<build_depend>message_generation</build_depend>
<build_depend>roslint</build_depend>
Expand Down