Commit e23b7f6d authored by Jacopo Serafin's avatar Jacopo Serafin
Browse files

Fixed to work with public version of April2 code.

parent 08949da1
Copyright (C) 2015-$YEAR, The Regents of The University of Michigan.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
dir := $(CURDIR)
export ROOT_PATH = $(CURDIR)
export SRC_PATH = $(ROOT_PATH)/src
export BIN_PATH = $(ROOT_PATH)/bin
export LIB_PATH = $(ROOT_PATH)/lib
export TEST_PATH = $(BIN_PATH)/test
export BUILD_COMMON = $(ROOT_PATH)/Build.common
export CONFIG_DIR = $(ROOT_PATH)/config
export APRIL_PATH = $(ROOT_PATH)/april2
export APRIL_LIB_PATH = $(APRIL_PATH)/lib
export LCM_PATH = $(ROOT_PATH)/src/lcmtypes
.SUFFIXES:
.SUFFIXES: .c .o
ROOT_PATH := $(dir)
SRC_PATH := $(ROOT_PATH)/src
BIN_PATH := $(ROOT_PATH)/bin
LIB_PATH := $(ROOT_PATH)/lib
CONFIG_DIR := $(ROOT_PATH)/config
LCM_PATH := $(ROOT_PATH)/src/lcmtypes
### Build flags for all targets
#
CFLAGS_STD := -std=gnu99 -g -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \
-D_REENTRANT -Wall -Wno-unused-parameter -Wno-unused-variable -Wno-format-zero-length \
-pthread -fPIC -I src/ -I april2/src/ -O3 -msse4.2 -fopenmp #-Werror
CXXFLAGS_STD := -std=gnu++98 -g -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \
-D_REENTRANT -Wall -Wno-unused-parameter -Wno-unused-variable -Wno-format-zero-length \
-pthread -fPIC -I src/ -I april2/src/ -O3 -msse4.2 -fopenmp # -v -Werror
LDFLAGS_STD := -fopenmp
LINK_LIBS_STD := -lpthread -lz -lm
CFLAGS_STD := -std=gnu99 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \
-D_REENTRANT -Wall -Wno-unused-parameter -Wno-unused-variable \
-Wno-format-zero-length -pthread -fPIC -Wredundant-decls -Werror \
-I src/ -I april2/src/ -O3 -msse4.2 -fopenmp # -v
LDFLAGS_STD :=
LINK_LIBS_STD := -lpthread -lz -lm -lgomp
export CFLAGS_LCM := `pkg-config --cflags lcm`
export LDFLAGS_LCM := `pkg-config --libs lcm`
export DEPS_LCM :=
export CFLAGS_GTK := `pkg-config --cflags gtk+-2.0`
export LDFLAGS_GTK := `pkg-config --libs gtk+-2.0`
export DEPS_GTK :=
MAKE := $(MAKE) --no-print-directory
### Build tools
#
CC = gcc
CXX = g++
AR = @echo "[$(notdir $(@))]" && ar rc $@ $^
COMP = @echo " $@" && $(CC) $(CFLAGS_STD) $(CFLAGS_TGT) -o $@ -c $<
LINK = @echo "[$(notdir $(@))]" && $(CC) $(LDFLAGS_STD) $(LDFLAGS_TGT) -o $@ $^ $(LDFLAGS_TGT) $(LINK_LIBS_STD) $(LINK_LIBS_TGT)
COMPLINK = @echo "[$(notdir $(@))]" && $(CC) $(CFLAGS_STD) $(CFLAGS_TGT) $(LDFLAGS_STD) -o $@ $^ $(LINK_LIBS_TGT) $(LINK_LIBS_STD) $(LDFLAGS_TGT)
CXXCOMP = @echo " $@" && $(CXX) $(CXXFLAGS_STD) $(CXXFLAGS_TGT) -o $@ -c $<
CXXLINK = @echo "[$(notdir $(@))]" && $(CXX) $(LDFLAGS_STD) $(LDFLAGS_TGT) -o $@ $^ $(LDFLAGS_TGT) $(LINK_LIBS_STD) $(LINK_LIBS_TGT)
CXXCOMPLINK = @echo "[$(notdir $(@))]" && $(CXX) $(CXXFLAGS_STD) $(CXXFLAGS_TGT) $(LDFLAGS_STD) -o $@ $^ $(LINK_LIBS_TGT) $(LINK_LIBS_STD) $(LDFLAGS_TGT)
AR = @echo " [$(notdir $(@))]" && ar rc $@ $^
COMP = @echo " $(notdir $(@))" && $(CC) $(CFLAGS_STD) $(CFLAGS_TGT) -o $@ -c $<
LINK = @echo " [$(notdir $(@))]" && $(CC) $(LDFLAGS_STD) $(LDFLAGS_TGT) -o $@ $^ $(LDFLAGS_TGT) $(LINK_LIBS_STD) $(LINK_LIBS_TGT)
COMPLINK = @echo " [$(notdir $(@))]" && $(CC) $(CFLAGS_STD) $(CFLAGS_TGT) $(LDFLAGS_STD) -o $@ $^ $(LINK_LIBS_TGT) $(LINK_LIBS_STD) $(LDFLAGS_TGT)
all: targets
all: april2 | targets
D := $(shell pwd)
include Rules.mk
.PHONY: april2
april2:
$(MAKE) -C $(ROOT_PATH)/april2
.PHONY: targets
targets: $(TGTS)
.PHONY: clean
clean:
$(MAKE) -C $(ROOT_PATH)/april2 clean
@rm -f $(CLEAN)
%.o: %.c %.h
@echo "$@"
$(COMP)
%.o: %.c
@echo "$@"
$(COMP)
%: %.c
@echo "$@"
$(COMPLINK)
%.o: %.cpp %.h
$(CXXCOMP)
%.o: %.cpp
$(CXXCOMP)
%: %.cpp
$(CXXCOMPLINK)
Overview
========
The project-template is intended to assist you in creating and organizing software projects in the APRIL lab. It consists of a simple directory tree, a build system (Make), appropriate .gitignore files, a submodule link to the common APRIL toolkit, and a document ('submodules.txt') explaining common operations with submodules (clone, commit, push/pull, merge, and merging your project with the APRIL toolkit when it's mature).
This document contains a 'Hello World' example for the build system and a setup guide to start developing from the project-template repository.
If you find errors or have improvements, contact
Audrow Nash audrow@umich.edu
Carl Kershaw ckershaw@umich.edu
Build system
============
The build system set up uses Make. The `Makefile` is in the top directory of the repository. The Make system uses `Rules.mk` to specify what should be built.
The "Hello World" example of the Make system is located in `src/template_example/`. This example uses `vx.h`, among other things, from the april2 repository. To build, from the top directory of the repository, enter `make`. After a successful build process, from the top directory, the executable can be found in the `bin` folder and is called `example-app`.
A build can be cleaned with the `make clean all` from the top directory.
Setup
=====
0. Connect your SSH key to clone APRIL repository
-------------------------------------------------
Once you have access to the APRIL GitLab group, generate an SSH key. Go to your profile on GitLab, click 'SSH Keys' on the left pane, and follow the instructions to generate your SSH key (when it asks where to save the file and passcode just press 'Enter' at each prompt to keep the default file and no passcode). Then load your SSH key to your SSH agent with `ssh-add`.
After you have generated an SSH key, return to your profile->SSH Keys in GitLab. Click 'Add SSH Key' and copy the entire text of `cat ~/.ssh/id_rsa.pub`. Don't worry about adding a title, it will default to your email. Click save.
You should now be able to clone APRIL repositories, including project-template.
1. Clone project-template
-------------------------
Clone project-template with the `--recursive` command to populate submodules; *if you forget use `git submodule update --recursive --init`.*
git clone --recursive git@umbrella.eecs.umich.edu:april/project-template.git
If you want the most recent version of the submodules - you probably do - use the following commands.
cd project-template
git submodule update --recursive --remote
2. Combine other repository with project-template
-------------------------------------------------
*Skip to step 3 if you are creating a new project.*
Add the repository who's history that you want to keep as a subtree. If you are cloning a repository from another location on your computer, suffix the location with `/.git`.
git subtree add --prefix=MOVE_OUT [SSH / directory / URL of your repo to merge into project-template] master
Now, the history of your repository and the template should be combined. One way to check is to use `git log --graph --pretty=oneline`. The contents of the repository will be in the directory MOVE_OUT.
Later, move your code into the directories of project-template with `git mv`. To move many files and directories to the same destination you can use `git mv -r dir1 file1 dir2 file2 ... destination`.
3. Change where project-template pushes to
------------------------------------------
Push your repository to the new origin. This can be the same origin as the repository you have moved into project-template.
git remote remove origin
git remote add origin [new repository].git
git push --set-upstream origin master
Conclusion
==========
At this point, you have setup your repository. You cloned project-template; if you are continuing a project, merged in history from another codebase; and changed where your project-template pushes to, making it your own repository.
In addition, you know how the build system works. You built a program in 'Hello World' that used code in the submodule. You saw that `Rules.mk` that directs the build system in what to build and you ran a program from the `bin` folder at the top of the repository.
You should be ready to begin development on this new repository derived from project-template. Happy Coding!
#Submodules
D := $(D)/april2
include $(D)/Rules.mk
D := $(realpath $(dir $(D)))
#april2
# include $(ROOT_PATH)/april2/Rules.mk
#define libs
LIBLCM := $(APRIL_LIB_PATH)/libaprillcmtypes.a
LIBCOMMON := $(APRIL_LIB_PATH)/libcommon.a
LIBEK := $(APRIL_LIB_PATH)/libek.a
LIBVX := $(APRIL_LIB_PATH)/libvx.a
LIBHTTPD := $(APRIL_LIB_PATH)/libaprilhttpd.a
LIBGRAPH := $(APRIL_LIB_PATH)/libgraph.a
LIBLCMTYPES := $(LIB_PATH)/libsclcmtypes.a $(LIBLCM)
LIBUTILS := $(LIB_PATH)/libutils.a
LIBVELODYNE32FEATURES := $(LIB_PATH)/libvelodyne32features.a
LIBVELODYNE32FEATURESSLAM := $(LIB_PATH)/libvelodyne32featuresslam.a
LDFLAGS_APRIL := $(LIB_PATH)/libvx.a $(LIB_PATH)/libgraph.a $(LIB_PATH)/libhttpd.a $(LIB_PATH)/libek.a $(LIB_PATH)/libcommon.a $(LIB_PATH)/libaprillcmtypes.a $(LIB_PATH)/libsim.a -lm -pthread
#source
D := $(D)/src
include $(D)/Rules.mk
D := $(realpath $(dir $(D)))
april2 @ 89f0e6a8
Subproject commit 85a2f2493d873aae2ebd8a25187999c319802d93
Subproject commit 89f0e6a85eee6b166857bf583b3d44132af24668
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
Copyright (C) 2015-$YEAR, The Regents of The University of Michigan.
All rights reserved.
This software was developed in the APRIL Robotics Lab under the
direction of Edwin Olson, ebolson@umich.edu. This software may be
available under alternative licensing terms; contact the address above.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The views and conclusions contained in the software and documentation are those
of the authors and should not be interpreted as representing official policies,
either expressed or implied, of the Regents of The University of Michigan.
\ No newline at end of file
......@@ -2,3 +2,6 @@ This folder contains archival versions of licenses. The presence of
these licenses in this folder does not mean that any particular
software is licensed under these terms. Rather, individual software
files may refer to licenses in this folder.
The software in this library, which extends the april2 library, is
released under the BSD license.
......@@ -6,6 +6,7 @@ H_$(D) := $(SRC_$(D):%.c=%.h)
bd_$(D) = $(realpath $(D)/../../)
$(bd_$(D))/src/lcmtypes/%.c: $(bd_$(D))/lcmtypes/%.lcm
@echo " $<"
lcm-gen -c --c-typeinfo --c-cpath $(dir $@) --c-hpath $(dir $@) --cinclude lcmtypes/ $<
......@@ -21,19 +22,15 @@ $(OBJS_$(D)): $(SRC_$(D)) $(H_$(D))
####################################################
$(OBJS_$(D)): $(LIB_PATH)/libaprillcmtypes.a
$(OBJS_$(D)): $(LIB_LCM)
LIBLCMTYPES_$(D) = $(LIB_PATH)/libsclcmtypes.a
LIBLCMTYPES_SO_$(D) = $(LIB_PATH)/libsclcmtypes.so
###################################################
$(LIBLCMTYPES_$(D)): $(OBJS_$(D))
@echo " $@"
@ar rc $@ $^
$(LIBLCMTYPES_SO_$(D)): $(OBJS_$(D))
@echo " $@"
@gcc -shared -o $@ $^
@echo "$@"
$(AR)
TGTS := $(TGTS) $(SRC_$(D)) $(LIBLCMTYPES_$(D)) $(LIBLCMTYPES_SO)
CLEAN := $(CLEAN) $(OBJS_$(D))
......@@ -6,26 +6,22 @@ LIB_SRC_$(D) := $(D)/image_utils.c $(D)/gl_utils.c
LIB_OBJS_$(D) := $(LIB_SRC_$(D):%.c=%.o)
OBJS_$(D) :=
CXXOBJS_$(D) :=
# List all targets, it's important for building and cleaning
TGTS_$(D) :=
CXXTGTS_$(D) :=
# List CFLAGS used when .o are compiled
$(LIB_OBJS_$(D)): CFLAGS_TGT := $(CFLAGS_APRIL)
$(OBJS_$(D)): CFLAGS_TGT := $(CFLAGS_APRIL)
$(CXXOBJS_$(D)): CXXFLAGS_TGT :=
# List LDFlags and libs youn depend on here
$(TGTS_$(D)): LDFLAGS_TGT := $(LDFLAGS_LCM)
$(TGTS_$(D)): $(LIBVX) $(LIBCOMMON)
$(CXXTGTS_$(D)): LDFLAGS_TGT :=
$(CXXTGTS_$(D)): $(LIBVX) $(LIBCOMMON)
$(TGTS_$(D)): LDFLAGS_TGT := $(LDFLAGS_LCM) $(LIBVX) $(LIBCOMMON)
$(TGTS_$(D)):
$(LIB_$(D)): $(LIB_OBJS_$(D))
@$(AR)
@echo "$@"
$(AR)
# If it doesn't make it into TGTS, it won't build
TGTS := $(TGTS) $(LIB_$(D)) $(TGTS_$(D)) $(CXXTGTS_$(D))
CLEAN := $(CLEAN) $(LIB_$(D)) $(LIB_OBJS_$(D)) $(TGTS_$(D)) $(OBJS_$(D)) $(CXXTGTS_$(D)) $(CXXOBJS_$(D))
TGTS := $(TGTS) $(LIB_$(D)) $(TGTS_$(D))
CLEAN := $(CLEAN) $(LIB_$(D)) $(LIB_OBJS_$(D)) $(TGTS_$(D)) $(OBJS_$(D))
/* Copyright (C) 2013-2016, The Regents of The University of Michigan.
All rights reserved.
This software was developed in the APRIL Robotics Lab under the
direction of Edwin Olson, ebolson@umich.edu. This software may be
available under alternative licensing terms; contact the address above.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The views and conclusions contained in the software and documentation are those
of the authors and should not be interpreted as representing official policies,
either expressed or implied, of the Regents of The University of Michigan.
*/
#include <math.h>
#include "vx/vx.h"
#include "vx/vxo_lines.h"
#include "vx/vxo_matrix.h"
#include <vx/vx.h>
#include <vx/vxo_lines.h>
#include <vx/vxo_matrix.h>
#include "gl_utils.h"
......
/* Copyright (C) 2013-2016, The Regents of The University of Michigan.
All rights reserved.
This software was developed in the APRIL Robotics Lab under the
direction of Edwin Olson, ebolson@umich.edu. This software may be
available under alternative licensing terms; contact the address above.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The views and conclusions contained in the software and documentation are those
of the authors and should not be interpreted as representing official policies,
either expressed or implied, of the Regents of The University of Michigan.
*/
#ifndef GL_UTILS_H
#define GL_UTILS_H
#include "vx/webvx.h"
#include <vx/webvx.h>
void save_snapshot(const vx_event_t *ev, const char *path);
......
/* Copyright (C) 2013-2016, The Regents of The University of Michigan.
All rights reserved.
This software was developed in the APRIL Robotics Lab under the
direction of Edwin Olson, ebolson@umich.edu. This software may be
available under alternative licensing terms; contact the address above.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The views and conclusions contained in the software and documentation are those
of the authors and should not be interpreted as representing official policies,
either expressed or implied, of the Regents of The University of Michigan.
*/
#include "image_utils.h"
void velodyne32_depth_image_write_pgm(const image_t *image, const char *path) {
......
/* Copyright (C) 2013-2016, The Regents of The University of Michigan.
All rights reserved.
This software was developed in the APRIL Robotics Lab under the
direction of Edwin Olson, ebolson@umich.edu. This software may be
available under alternative licensing terms; contact the address above.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The views and conclusions contained in the software and documentation are those
of the authors and should not be interpreted as representing official policies,
either expressed or implied, of the Regents of The University of Michigan.
*/
#ifndef IMAGE_UTILS_H
#define IMAGE_UTILS_H
#include "lcmtypes/image_t.h"
#include <lcmtypes/image_t.h>
void velodyne32_depth_image_write_pgm(const image_t *image, const char *path);
......
......@@ -14,29 +14,23 @@ LIB_OBJS_$(D) := $(LIB_SRC_$(D):%.c=%.o)
OBJS_$(D) := $(D)/velodyne32_features_slam.o \
$(D)/velodyne32_features_graph_optimizer.o $(D)/velodyne32_features_slam_dumper.o \
$(D)/velodyne32_features_slam.o
CXXOBJS_$(D) :=
# List all targets, it's important for building and cleaning
TGTS_$(D) := $(BIN_PATH)/velodyne32-features-slam \
$(BIN_PATH)/velodyne32-features-graph-optimizer $(BIN_PATH)/velodyne32-features-slam-dumper \
$(BIN_PATH)/velodyne32-features-offline-slam
CXXTGTS_$(D) :=
# List CFLAGS used when .o are compiled
$(LIB_OBJS_$(D)): CFLAGS_TGT := $(CFLAGS_APRIL)
$(OBJS_$(D)): CFLAGS_TGT := $(CFLAGS_APRIL)
$(CXXOBJS_$(D)): CXXFLAGS_TGT :=
# List LDFlags and libs youn depend on here
$(TGTS_$(D)): LDFLAGS_TGT := $(LDFLAGS_LCM)
$(TGTS_$(D)): $(LIBGRAPH) $(LIBVELODYNE32FEATURESSLAM) $(LIBVELODYNE32FEATURES) \
$(LIBUTILS) $(LIBVX) $(LIBHTTPD) $(LIBLCMTYPES) $(LIBCOMMON)
$(CXXTGTS_$(D)): LDFLAGS_TGT :=
$(CXXTGTS_$(D)): $(LIBGRAPH) $(LIBVELODYNE32FEATURESSLAM) $(LIBVELODYNE32FEATURES) \
$(LIBUTILS) $(LIBVX) $(LIBHTTPD) $(LIBLCMTYPES) $(LIBCOMMON)
$(TGTS_$(D)): LDFLAGS_TGT := $(LDFLAGS_LCM) $(LIBGRAPH) $(LIBVX) $(LIBHTTPD) $(LIBLCMTYPES) $(LIBEK) $(LIBCOMMON)
$(TGTS_$(D)): $(LIBVELODYNE32FEATURESSLAM) $(LIBVELODYNE32FEATURES) $(LIBUTILS)
$(LIB_$(D)): $(LIB_OBJS_$(D))
@$(AR)
@echo "$@"
$(AR)
$(BIN_PATH)/velodyne32-features-slam: $(D)/velodyne32_features_slam.o
$(LINK)
......@@ -51,5 +45,5 @@ $(BIN_PATH)/velodyne32-features-offline-slam: $(D)/velodyne32_features_offline_s
$(LINK)
# If it doesn't make it into TGTS, it won't build
TGTS := $(TGTS) $(LIB_$(D)) $(TGTS_$(D)) $(CXXTGTS_$(D))
CLEAN := $(CLEAN) $(LIB_$(D)) $(LIB_OBJS_$(D)) $(TGTS_$(D)) $(OBJS_$(D)) $(CXXTGTS_$(D)) $(CXXOBJS_$(D))
TGTS := $(TGTS) $(LIB_$(D)) $(TGTS_$(D))
CLEAN := $(CLEAN) $(LIB_$(D)) $(LIB_OBJS_$(D)) $(TGTS_$(D)) $(OBJS_$(D))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment