Permalink
Browse files

Add generated types (#31)

* Add generated types

* Small fix to gams.mpc to remove dependency on GAMS

* Add back in Datatypes.h

* Fix comparison operators for coordinates

* Remove unnecessary .NOTPARALLEL from generated make files to speed up build
  • Loading branch information...
TheDash authored and dskyle committed Aug 27, 2018
1 parent 8a67af7 commit 0f8d84b89c5412a93b3206a36b81218ed88d1408
Showing with 2,640 additions and 9 deletions.
  1. +12 −0 .gitignore
  2. +3 −2 .travis.yml
  3. +4 −0 default.features
  4. +22 −1 gams.mpc
  5. +15 −6 scripts/linux/base_build.sh
  6. +918 −0 scripts/linux/generate_schemas.py
  7. +16 −0 src/gams/types/Accel.capnp
  8. +17 −0 src/gams/types/AccelStamped.capnp
  9. +16 −0 src/gams/types/AccelWithCovariance.capnp
  10. +17 −0 src/gams/types/AccelWithCovarianceStamped.capnp
  11. +28 −0 src/gams/types/BatteryState.capnp
  12. +26 −0 src/gams/types/CameraInfo.capnp
  13. +15 −0 src/gams/types/ChannelFloat32.capnp
  14. +17 −0 src/gams/types/ColorRGBA.capnp
  15. +17 −0 src/gams/types/CompressedImage.capnp
  16. +101 −0 src/gams/types/Datatypes.h
  17. +24 −0 src/gams/types/DisparityImage.capnp
  18. +14 −0 src/gams/types/Duration.capnp
  19. +17 −0 src/gams/types/FluidPressure.capnp
  20. +19 −0 src/gams/types/GridCells.capnp
  21. +16 −0 src/gams/types/Header.capnp
  22. +17 −0 src/gams/types/Illuminance.capnp
  23. +21 −0 src/gams/types/Image.capnp
  24. +23 −0 src/gams/types/Imu.capnp
  25. +22 −0 src/gams/types/Inertia.capnp
  26. +17 −0 src/gams/types/InertiaStamped.capnp
  27. +19 −0 src/gams/types/JointState.capnp
  28. +17 −0 src/gams/types/Joy.capnp
  29. +16 −0 src/gams/types/JoyFeedback.capnp
  30. +15 −0 src/gams/types/JoyFeedbackArray.capnp
  31. +14 −0 src/gams/types/LaserEcho.capnp
  32. +24 −0 src/gams/types/LaserScan.capnp
  33. +18 −0 src/gams/types/MagneticField.capnp
  34. +19 −0 src/gams/types/MapMetaData.capnp
  35. +22 −0 src/gams/types/MultiDOFJointState.capnp
  36. +25 −0 src/gams/types/MultiEchoLaserScan.capnp
  37. +22 −0 src/gams/types/NavSatFix.capnp
  38. +15 −0 src/gams/types/NavSatStatus.capnp
  39. +18 −0 src/gams/types/OccupancyGrid.capnp
  40. +20 −0 src/gams/types/Odometry.capnp
  41. +17 −0 src/gams/types/Path.capnp
  42. +27 −0 src/gams/types/PidState.capnp
  43. +16 −0 src/gams/types/Point.capnp
  44. +16 −0 src/gams/types/Point32.capnp
  45. +19 −0 src/gams/types/PointCloud.capnp
  46. +24 −0 src/gams/types/PointCloud2.capnp
  47. +17 −0 src/gams/types/PointField.capnp
  48. +17 −0 src/gams/types/PointStamped.capnp
  49. +15 −0 src/gams/types/Polygon.capnp
  50. +17 −0 src/gams/types/PolygonStamped.capnp
  51. +17 −0 src/gams/types/Pose.capnp
  52. +16 −0 src/gams/types/Pose2D.capnp
  53. +17 −0 src/gams/types/PoseArray.capnp
  54. +17 −0 src/gams/types/PoseStamped.capnp
  55. +16 −0 src/gams/types/PoseWithCovariance.capnp
  56. +17 −0 src/gams/types/PoseWithCovarianceStamped.capnp
  57. +17 −0 src/gams/types/Quaternion.capnp
  58. +17 −0 src/gams/types/QuaternionStamped.capnp
  59. +20 −0 src/gams/types/Range.capnp
  60. +18 −0 src/gams/types/RegionOfInterest.capnp
  61. +17 −0 src/gams/types/RelativeHumidity.capnp
  62. +17 −0 src/gams/types/Temperature.capnp
  63. +14 −0 src/gams/types/Time.capnp
  64. +17 −0 src/gams/types/TimeReference.capnp
  65. +17 −0 src/gams/types/Transform.capnp
  66. +18 −0 src/gams/types/TransformStamped.capnp
  67. +16 −0 src/gams/types/Twist.capnp
  68. +17 −0 src/gams/types/TwistStamped.capnp
  69. +16 −0 src/gams/types/TwistWithCovariance.capnp
  70. +17 −0 src/gams/types/TwistWithCovarianceStamped.capnp
  71. +16 −0 src/gams/types/Vector3.capnp
  72. +17 −0 src/gams/types/Vector3Stamped.capnp
  73. +23 −0 src/gams/types/VoxelGrid.capnp
  74. +16 −0 src/gams/types/Wrench.capnp
  75. +17 −0 src/gams/types/WrenchStamped.capnp
  76. +23 −0 tests.mpc
  77. +267 −0 tests/test_types.cpp
  78. +29 −0 using_capnp.mpb
  79. +11 −0 using_types.mpb
@@ -56,3 +56,15 @@ target/
.project
.settings
blacklist
whitelist
*.bag
src/gams/types/*.c++
src/gams/types/*.h
!src/gams/types/Datatypes.h
*.bin
*.tar.gz
vrep/
capnproto/
MPC/
@@ -142,8 +142,8 @@ script:
- echo "TRAVIS_BUILD_DIR=$TRAVIS_BUILD_DIR"
- echo ls $TRAVIS_BUILD_DIR
- ls $TRAVIS_BUILD_DIR
- echo $GAMS_ROOT/scripts/$OS/base_build.sh prereqs $CLANG madara gams tests $SSL $JAVA $ZMQ $PYTHON $ROS $SIMTIME
- $GAMS_ROOT/scripts/$OS/base_build.sh prereqs $CLANG madara gams tests $SSL $JAVA $ZMQ $PYTHON $ROS $SIMTIME
- echo $GAMS_ROOT/scripts/$OS/base_build.sh prereqs $CLANG madara gams tests types $SSL $JAVA $ZMQ $PYTHON $ROS $SIMTIME
- $GAMS_ROOT/scripts/$OS/base_build.sh prereqs $CLANG madara gams tests types $SSL $JAVA $ZMQ $PYTHON $ROS $SIMTIME
- $GAMS_ROOT/bin/test_arguments_parser
- $GAMS_ROOT/bin/test_auctions
- $GAMS_ROOT/bin/test_controller_run
@@ -156,4 +156,5 @@ script:
- if [ "$ROS" == "ros" ]; then $GAMS_ROOT/bin/test_ros2gams; fi
- $GAMS_ROOT/bin/test_utility
- $GAMS_ROOT/bin/test_variables
- $GAMS_ROOT/bin/test_types
@@ -53,6 +53,10 @@ docs = 0
/// Enable this to support ROS platforms
ros = 0
/// @feature types
/// Enables this to build libTYPES.so
types = 0
/// @feature nortti
/// Enable this feature if you don't want GAMS to use RTTI
@@ -193,9 +193,10 @@ project (gams) : build_files, using_madara, using_utm, using_ros, using_vrep, vr
src/gams
}
}
}
project (gams_controller) : using_gams, using_madara, using_vrep {
exeout = $(GAMS_ROOT)/bin
exename = gams_controller
@@ -239,3 +240,23 @@ project (ros2gams) : using_madara, using_ros, using_gams {
src/gams/programs/ros2gams.cpp
}
}
project (types) : using_madara, using_capnp {
requires += types
libout = lib
libout = $(GAMS_ROOT)/lib
sharedname = TYPES
CAPN_Files {
src/gams/types
}
Header_Files {
src/gams/types
}
Source_Files {
src/gams/types
}
}
@@ -97,6 +97,7 @@ PYTHON=0
CLEAN=1
MAC=${MAC:-0}
BUILD_ERRORS=0
TYPES=0
MPC_DEPENDENCY_ENABLED=0
MADARA_DEPENDENCY_ENABLED=0
@@ -148,6 +149,8 @@ do
PREREQS=1
elif [ "$var" = "vrep" ]; then
VREP=1
elif [ "$var" = "types" ]; then
TYPES=1
elif [ "$var" = "vrep-config" ]; then
VREP_CONFIG=1
elif [ "$var" = "java" ]; then
@@ -209,6 +212,7 @@ do
echo " ssl build with OpenSSL support"
echo " strip strip symbols from the libraries"
echo " tests build test executables"
echo " types builds libTYPES.so"
echo " vrep build with vrep support"
echo " vrep-config configure vrep to support up to 20 agents"
echo " zmq build with ZeroMQ support"
@@ -883,8 +887,13 @@ if [ $GAMS -eq 1 ] || [ $GAMS_AS_A_PREREQ -eq 1 ]; then
cd $GAMS_ROOT
echo "GENERATING GAMS PROJECT"
echo "perl $MPC_ROOT/mwc.pl -type make -features java=$JAVA,ros=$ROS,vrep=$VREP,tests=$TESTS,android=$ANDROID,docs=$DOCS,clang=$CLANG,debug=$DEBUG gams.mwc"
perl $MPC_ROOT/mwc.pl -type make -features java=$JAVA,ros=$ROS,vrep=$VREP,tests=$TESTS,android=$ANDROID,docs=$DOCS,clang=$CLANG,debug=$DEBUG gams.mwc
echo "perl $MPC_ROOT/mwc.pl -type make -features java=$JAVA,ros=$ROS,types=$TYPES,vrep=$VREP,tests=$TESTS,android=$ANDROID,docs=$DOCS,clang=$CLANG,debug=$DEBUG gams.mwc"
perl $MPC_ROOT/mwc.pl -type make -features java=$JAVA,ros=$ROS,types=$TYPES,vrep=$VREP,tests=$TESTS,android=$ANDROID,docs=$DOCS,clang=$CLANG,debug=$DEBUG gams.mwc
if [ $TYPES -eq 1 ]; then
# Strip the unnecessary NOTPARALLEL: directives
sed -i '/\.NOTPARALLEL:/d' Makefile.types
fi
if [ $JAVA -eq 1 ]; then
# sometimes the jar'ing will occur before all classes are actually built when performing
@@ -893,10 +902,10 @@ if [ $GAMS -eq 1 ] || [ $GAMS_AS_A_PREREQ -eq 1 ]; then
fi
echo "BUILDING GAMS"
echo "make depend java=$JAVA ros=$ROS vrep=$VREP tests=$TESTS android=$ANDROID docs=$DOCS -j $CORES"
make depend java=$JAVA ros=$ROS vrep=$VREP tests=$TESTS android=$ANDROID docs=$DOCS -j $CORES
echo "make java=$JAVA ros=$ROS vrep=$VREP tests=$TESTS android=$ANDROID docs=$DOCS -j $CORES"
make java=$JAVA ros=$ROS vrep=$VREP tests=$TESTS android=$ANDROID docs=$DOCS -j $CORES
echo "make depend java=$JAVA ros=$ROS types=$TYPES vrep=$VREP tests=$TESTS android=$ANDROID docs=$DOCS -j $CORES"
make depend java=$JAVA ros=$ROS types=$TYPES vrep=$VREP tests=$TESTS android=$ANDROID docs=$DOCS -j $CORES
echo "make java=$JAVA ros=$ROS types=$TYPES vrep=$VREP tests=$TESTS android=$ANDROID docs=$DOCS -j $CORES"
make java=$JAVA ros=$ROS types=$TYPES vrep=$VREP tests=$TESTS android=$ANDROID docs=$DOCS -j $CORES
GAMS_BUILD_RESULT=$?
GAMS_BUILD_RESULT=$?
if [ ! -f $GAMS_ROOT/lib/libGAMS.so ]; then
Oops, something went wrong.

0 comments on commit 0f8d84b

Please sign in to comment.