在ROS中使用树莓派读取GY-85 2 IMU read_GY-85_from_ROS_via_RarpberryPi 2

#上一篇讲了GY-85在ROS里面的读取,这里补上该PROJECT文件中的CMakelist.txt 和 package.xml 不一定完全正确,但是有编译需要的所以lib/ The pervious post is talking about the content of node c++ file. Here are the CMakelist.txt and package.xml file that related in the parent folder. These may not fully correct, but it give the catkin what needs for build.

1.package.xml

<?xml version="1.0"?>
<package format="2">
<name>imu2core</name>
<version>0.0.0</version>
<description>The imu2core package</description>

<!-- One maintainer tag required, multiple allowed, one person per tag -->
<!-- Example: -->
<!-- <maintainer email="jane.doe@example.com">Jane Doe</maintainer> -->
<maintainer email="rikirobot@todo.todo">rikirobot</maintainer>


<!-- One license tag required, multiple allowed, one license per tag -->
<!-- Commonly used license strings: -->
<!-- BSD, MIT, Boost Software License, GPLv2, GPLv3, LGPLv2.1, LGPLv3 -->
<license>BSD</license>


<buildtool_depend>catkin</buildtool_depend>
<build_depend>tf</build_depend>
<build_depend>roscpp</build_depend>
<build_depend>rospy</build_depend>
<build_export_depend>tf</build_export_depend>
<build_export_depend>roscpp</build_export_depend>
<build_export_depend>rospy</build_export_depend>
<exec_depend>roscpp</exec_depend>
<exec_depend>rospy</exec_depend>
<exec_depend>tf</exec_depend>
<build_depend>wiringPi</build_depend>
<build_export_depend>wiringPi</build_export_depend>
<exec_depend>wiringPi</exec_depend>


<!-- The export tag contains other, unspecified, tags -->
<export>
<!-- Other tools can request additional information be placed here -->

</export>
</package>

  1. CMakelist.txt
    cmake_minimum_required(VERSION 2.8.3)
    project(imu2core)

    ## Find catkin and any catkin packages
    find_package(catkin REQUIRED COMPONENTS
    roscpp
    rosconsole
    tf
    )
    catkin_package()

    include_directories(
    ${catkin_INCLUDE_DIRS}

    )
    FIND_LIBRARY(WIRINGPI_LIBRARY wiringPi /home/rikirobot/wiringPi)

    add_executable(state_publisher src/state_publisher.cpp)
    target_link_libraries(state_publisher ${catkin_LIBRARIES} ${WIRINGPI_LIBRARY} ${wiringPi})
加载评论框需要翻墙