Skip to content

Commit

Permalink
WIP #3: Switched back to older version of libraries
Browse files Browse the repository at this point in the history
Trying to see if this could be what was causing compilation errors on raspberry pi
  • Loading branch information
Jacob Gloudemans committed Jan 17, 2019
1 parent f094d3c commit 5f24c1f
Show file tree
Hide file tree
Showing 140 changed files with 1,465 additions and 9,974 deletions.
68 changes: 44 additions & 24 deletions motor_control/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,40 +1,52 @@
cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 2.8.3)
project(motor_control)

## Compile as C++11, supported in ROS Kinetic and newer
add_compile_options(-std=c++11)

## Detect system architecture and save it to $arch
EXECUTE_PROCESS( COMMAND uname -m COMMAND tr -d '\n' OUTPUT_VARIABLE arch )

## Compile as C++11, supported in ROS Kinetic and newer
add_compile_options(-std=c++11)

## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
dynamic_reconfigure
roscpp
rospy
std_msgs
geometry_msgs
custom_msgs
find_package(catkin REQUIRED
COMPONENTS
roscpp
geometry_msgs
)

## System dependencies are found with CMake's conventions
# find_package(Boost REQUIRED COMPONENTS system)
find_package (Threads REQUIRED)

###################################
## catkin specific configuration ##
###################################
## The catkin_package macro generates cmake config files for your package
## Declare things to be passed to dependent projects
## INCLUDE_DIRS: uncomment this if your package contains header files
## LIBRARIES: libraries you create in this project that dependent projects also need
## CATKIN_DEPENDS: catkin_packages dependent projects also need
## DEPENDS: system dependencies of this project that dependent projects also need
catkin_package(
INCLUDE_DIRS include
LIBRARIES CTRE_Phoenix CTRE_PhoenixCCI CTRE_PhoenixPlatformLinuxSocketCan CTRE_PhoenixCanutils
# CATKIN_DEPENDS other_catkin_pkg
# DEPENDS system_lib
)

###########
## Build ##
###########

## Specify additional locations of header files
## Your package locations should be listed before other locations
include_directories(
include
${catkin_INCLUDE_DIRS}
include
${catkin_INCLUDE_DIRS}
)


## Declare libraries to be imported
ADD_LIBRARY(CTRE_Phoenix STATIC IMPORTED)
ADD_LIBRARY(CTRE_PhoenixCCI STATIC IMPORTED)
Expand Down Expand Up @@ -64,23 +76,31 @@ else()
message( FATAL_ERROR "Unrecognized architecture: ${arch}" )
endif()


## Declare a C++ executable
## With catkin_make all packages are built within a single CMake context
## The recommended prefix ensures that target names across packages don't collide
# add_executable(${PROJECT_NAME}_node src/phoenix_node.cpp)
#add_executable(phoenix_node ${PROJECT_SOURCE_DIR}/example.cpp)
add_executable(example ${PROJECT_SOURCE_DIR}/src/example.cpp)

## Specify libraries to link a library or executable target against
target_link_libraries(example
${catkin_LIBRARIES}
Threads::Threads
CTRE_Phoenix CTRE_PhoenixCCI CTRE_PhoenixPlatformLinuxSocketCan CTRE_PhoenixCanutils)
${catkin_LIBRARIES}
Threads::Threads
CTRE_Phoenix CTRE_PhoenixCCI CTRE_PhoenixPlatformLinuxSocketCan CTRE_PhoenixCanutils
)

#############
## Install ##
#############

install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${arch}/*
DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
)
DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
)

## Mark cpp header files for installation
install(DIRECTORY include/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
FILES_MATCHING PATTERN "*.h"
PATTERN ".svn" EXCLUDE
)
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
FILES_MATCHING PATTERN "*.h"
PATTERN ".svn" EXCLUDE
)
19 changes: 19 additions & 0 deletions motor_control/include/Platform-linux-socket-can.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#pragma once

namespace ctre {
namespace phoenix {
namespace platform {
namespace can {
int SetCANInterface(const char * interface);
}
}
}
}

namespace ctre {
namespace phoenix {
namespace platform {
void FeedWatchDog(int timeoutMs);
}
}
}
46 changes: 18 additions & 28 deletions motor_control/include/ctre/Phoenix.h
Original file line number Diff line number Diff line change
@@ -1,39 +1,29 @@
#pragma once

#ifndef Phoenix_No_WPI
#define Phoenix_WPI
#endif

#include "ctre/phoenix/CANifier.h"
#include "ctre/phoenix/ErrorCode.h"
#include "ctre/phoenix/paramEnum.h"
#include "ctre/phoenix/HsvToRgb.h"
#include "ctre/phoenix/LinearInterpolation.h"
#include "ctre/phoenix/motion/BufferedTrajectoryPointStream.h"
#include "ctre/phoenix/motion/MotionProfileStatus.h"
#include "ctre/phoenix/motion/TrajectoryPoint.h"
#include "ctre/phoenix/motorcontrol/can/TalonSRX.h"
#include "ctre/phoenix/motorcontrol/can/VictorSPX.h"
#include "ctre/phoenix/motorcontrol/DemandType.h"
#include "ctre/phoenix/motorcontrol/Faults.h"
#include "ctre/phoenix/motorcontrol/FollowerType.h"
#include "ctre/phoenix/motorcontrol/IMotorController.h"
#include "ctre/phoenix/motorcontrol/IMotorControllerEnhanced.h"
#include "ctre/phoenix/motorcontrol/InvertType.h"
#include "ctre/phoenix/motorcontrol/SensorCollection.h"
#include "ctre/phoenix/sensors/PigeonIMU.h"
#include "ctre/phoenix/signals/MovingAverage.h"
#include "ctre/phoenix/tasking/Schedulers/ConcurrentScheduler.h"
#include "ctre/phoenix/tasking/ILoopable.h"
#include "ctre/phoenix/tasking/IProcessable.h"
#include "ctre/phoenix/Motion/MotionProfileStatus.h"
#include "ctre/phoenix/Motion/TrajectoryPoint.h"
#include "ctre/phoenix/MotorControl/CAN/TalonSRX.h"
#include "ctre/phoenix/MotorControl/CAN/VictorSPX.h"
#include "ctre/phoenix/MotorControl/CAN/WPI_TalonSRX.h"
#include "ctre/phoenix/MotorControl/CAN/WPI_VictorSPX.h"
#include "ctre/phoenix/MotorControl/DemandType.h"
#include "ctre/phoenix/MotorControl/Faults.h"
#include "ctre/phoenix/MotorControl/FollowerType.h"
#include "ctre/phoenix/MotorControl/SensorCollection.h"
#include "ctre/phoenix/MotorControl/IMotorController.h"
#include "ctre/phoenix/MotorControl/IMotorControllerEnhanced.h"
#include "ctre/phoenix/Sensors/PigeonIMU.h"
#include "ctre/phoenix/Signals/MovingAverage.h"
#include "ctre/phoenix/Tasking/Schedulers/ConcurrentScheduler.h"
#include "ctre/phoenix/Tasking/ILoopable.h"
#include "ctre/phoenix/Tasking/IProcessable.h"
#include "ctre/phoenix/Tasking/ButtonMonitor.h"
#include "ctre/phoenix/Utilities.h"

#ifdef Phoenix_WPI
#include "ctre/phoenix/motorcontrol/can/WPI_TalonSRX.h"
#include "ctre/phoenix/motorcontrol/can/WPI_VictorSPX.h"
#include "ctre/phoenix/tasking/ButtonMonitor.h"
#endif

using namespace ctre;
using namespace ctre::phoenix;
using namespace ctre::phoenix::motion;
Expand Down
23 changes: 0 additions & 23 deletions motor_control/include/ctre/phoenix/CANBusAddressable.h

This file was deleted.

Loading

0 comments on commit 5f24c1f

Please sign in to comment.