Skip to content

Commit

Permalink
Develop ros1 (#269)
Browse files Browse the repository at this point in the history
* Feature/ci rosbag evaluation (#233)

* support for nmea and canless mode (#190)

* Add eagleye_pp and trajectory_plot to ci

* No smoothingDeadReckoning if there is no rtk fix solution

* Add CI for regression test

* Add log csv

* Add log csv

* Add -y flag to apt install commands

* Add pip in CI

* Add pip install in CI

* Add source in CI

* Change eagleye log csv

* Remove melodic CI

---------

Co-authored-by: YutaHoda <[email protected]>
Co-authored-by: YutaHoda <[email protected]>

* Correction of errors in warning statements

* Refactor angular_velocity_offset_stop (#238)

* Added comment and refactor

* Make it class

* Fixed compilation error

* Changed stop judgement condition

* Update sample rosbag for CI

---------

Co-authored-by: autoware <[email protected]>

* Feature/covariance position(ROS1) (#240)

* covariance output

* fix yaml file

* Adding parameters to various locations

---------

Co-authored-by: map4 <[email protected]>

* Change how to install submodules(ROS1) (#242)

* Change how to install submodules

* Delete submodule checkout in CI

* Indatall GeographicLib in CI

* Add checkout in CI

* Refactor gnss_converter_node by converting it into a class (#245)

* Delete unused variables

* Removing unnecessary trailing

* Fix judgment to judgement

* Refactor gnss_converter_node by converting it into a class

* Delete submodules

* Correction of improper indentation

* Refactor eagleye_util excluding fix2pose (#246)

* Delete unused variables

* Removing unnecessary trailing

* Fix judgment to judgement

* Refactor gnss_converter_node by converting it into a class

* Delete submodules

* Correction of improper indentation

* Refactor can_velocity_converter

* Refactor fix2kml

* Refctor eagleye_pp (#247)

* Delete unused variables

* Removing unnecessary trailing

* Fix judgment to judgement

* Refactor gnss_converter_node by converting it into a class

* Delete submodules

* Correction of improper indentation

* Refactor can_velocity_converter

* Refactor fix2kml

* Refactor eagleye_pp.cpp

* Fix wrong argument (#248)

* Delete unused variables

* Removing unnecessary trailing

* Fix judgment to judgement

* Refactor gnss_converter_node by converting it into a class

* Delete submodules

* Correction of improper indentation

* Refactor can_velocity_converter

* Refactor fix2kml

* Refactor eagleye_pp.cpp

* Fix wrong argument

* Add meridional-aberration-angle_correction (#251)

* Feature/ros1/reverse imu param (#252)

* import Axes3D

* Add reverse imu param

* Fix path error (#253)

* Add input-doppler-filtering-reliability (#255)

* Files rename (#257)

* Allow warnings to be output when fixes are inaccurate (#260)

* Fi x calib launch error (#264)

* Feature/ros1/dual antenna mode sync(ROS1) (#266)

* Dual antenna refactoring(WIP)

* Fix pram bug

* Make use_multi_antenna_mode false

* Add reverse imu param in post process (#267)

* Remove eagleye_pp (#268)

* Remove eagleye_pp

* Fix CONTRIBUTING.md

---------

Co-authored-by: YutaHoda <[email protected]>
Co-authored-by: YutaHoda <[email protected]>
Co-authored-by: Tomoya Sato <[email protected]>
Co-authored-by: Aoki-Takanose <[email protected]>
  • Loading branch information
5 people authored May 23, 2023
1 parent 761eed4 commit 9772b33
Show file tree
Hide file tree
Showing 91 changed files with 2,232 additions and 5,606 deletions.
55 changes: 11 additions & 44 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,48 +2,9 @@ name: build
on: pull_request

jobs:
melodic_build:
runs-on: ubuntu-18.04

container: ros:melodic
services:
ros:
image: ros

defaults:
run:
shell: bash

steps:
- name: checkout
uses: actions/checkout@v1
with:
submodules: true
- name: rosdep update
run: |
apt-get update
rosdep update
- name: Create Workspace
run: |
mkdir -p ~/eagleye/src/
cp -r `pwd` ~/eagleye/src/
- name: Clone rtklib_msgs
run: |
cd ~/eagleye/src/
git clone https://github.com/MapIV/rtklib_ros_bridge.git
- name: Build
run: |
cd ~/eagleye/
source /opt/ros/melodic/setup.bash
rosdep install --from-paths src --ignore-src -r -y
catkin_make -DCMAKE_BUILD_TYPE=Release -j1
noetic_build:
runs-on: ubuntu-20.04

container: ros:noetic
services:
ros:
Expand All @@ -56,8 +17,6 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v1
with:
submodules: true

- name: rosdep update
run: |
Expand All @@ -69,15 +28,23 @@ jobs:
mkdir -p ~/eagleye/src/
cp -r `pwd` ~/eagleye/src/
- name: Clone rtklib_msgs
- name: Clone submodules
run: |
cd ~/eagleye/src/
apt-get install git -y
git clone https://github.com/MapIV/rtklib_ros_bridge.git
git clone https://github.com/MapIV/kml_generator
git clone https://github.com/MapIV/multi_rosbag_controller.git
git clone https://github.com/MapIV/llh_converter
git clone https://github.com/MapIV/gnss_compass_ros.git
- name: Install GeographicLib
run: |
apt-get install -y libgeographic-dev geographiclib-tools geographiclib-doc
- name: Build
run: |
cd ~/eagleye/
source /opt/ros/noetic/setup.bash
rosdep install --from-paths src --ignore-src -r -y
catkin_make -DCMAKE_BUILD_TYPE=Release -j1
catkin_make -DCMAKE_BUILD_TYPE=Release -j2
10 changes: 0 additions & 10 deletions .gitmodules

This file was deleted.

11 changes: 5 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
# Contributing to Eagleye
## Repository branch structure
- main-ros1
This is the latest stable version of Eagleye ROS1. It is updated every three months.
- **develop-ros1**
If contributors wish to add functionality to eagleye, they should create a new branch from this develop branch and submit a pull request.

- main-ros2
This is the latest stable version of Eagleye ROS2. It is updated every three months.
- develop-ros2
This is a branch to reflect changes in develop-ros1 to ros2 as well.
MapIV develops eagleye functions mainly in ROS1, but if you are using eagleye in ROS2 and want to submit a PR,
please submit a PR in this branch.
If contributors wish to add functionality to eagleye, they should create a new branch from this develop branch and submit a pull request.
- main-ros1
This is the latest stable version of Eagleye ROS1. Public development at ros1 ended in May 2023.

- feature/<feature_name>
Branches for new features and improvements
- fix/<bug_name>
Expand Down
15 changes: 6 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,11 @@ Clone and Build MapIV's fork of [RTKLIB](https://github.com/MapIV/RTKLIB/tree/rt
Clone and build the necessary packages for Eagleye.

cd $HOME/catkin_ws/src
git clone --recursive https://github.com/MapIV/eagleye.git
git clone https://github.com/MapIV/eagleye.git
git clone https://github.com/MapIV/rtklib_ros_bridge.git
git clone https://github.com/MapIV/kml_generator
git clone https://github.com/MapIV/multi_rosbag_controller.git
git clone https://github.com/MapIV/llh_converter
git clone https://github.com/MapIV/nmea_comms.git
git clone https://github.com/MapIV/nmea_ros_bridge.git
git clone https://github.com/MapIV/gnss_compass_ros.git
Expand Down Expand Up @@ -124,13 +127,9 @@ Clone and build the necessary packages for Eagleye.

- [eagleye_rt](eagleye_rt) : real-time version

## eagleye_pp

- [eagleye_pp](eagleye_pp) : post-processing version

## Optional Features

### canless mode
### can_less mode

While normal eagleye requires CAN (wheel speed) information, this option allows localization estimation with GNSS/IMU alone, without vehicle speed.

Expand All @@ -140,13 +139,11 @@ However, in this mode, note the following
- Localization estimating is not possible when driving backward.

To use this mode
- Use launch/eagleye_rt_canless.launch for eagleye_rt instead of launch/eagleye_rt.launch.
- Set use_canless_mode in eagleye_pp_config.yaml to true for eagleye_pp.
- Use launch/eagleye_rt_can_less.launch for eagleye_rt instead of launch/eagleye_rt.launch.

### dual antenna mode

This option allows for more immediate heading estimatiion, and allows GNSS to estimate heading even at low speeds.
eagleye_pp not yet supported.

To use this mode
- Use launch/eagleye_rt_dualantenna.launch for eagleye_rt instead of launch/eagleye_rt.launch.
Expand Down
2 changes: 1 addition & 1 deletion eagleye_core/coordinate/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ find_package(catkin REQUIRED COMPONENTS

find_package(PkgConfig)
find_path(GeographicLib_INCLUDE_DIR GeographicLib/Config.h
PAHT_SUFFIXES GeographicLib
PATH_SUFFIXES GeographicLib
)
set(GeographicLib_LIBRARIES
NAMES Geographic
Expand Down
6 changes: 3 additions & 3 deletions eagleye_core/navigation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ include_directories(
add_library(navigation
src/velocity_scale_factor.cpp
src/distance.cpp
src/yawrate_offset_stop.cpp
src/yawrate_offset.cpp
src/yaw_rate_offset_stop.cpp
src/yaw_rate_offset.cpp
src/heading.cpp
src/position.cpp
src/slip_angle.cpp
Expand All @@ -45,7 +45,7 @@ add_library(navigation
src/position_interpolate.cpp
src/height.cpp
src/angular_velocity_offset_stop.cpp
src/rtk_deadreckoning.cpp
src/rtk_dead_reckoning.cpp
src/rtk_heading.cpp
src/enable_additional_rolling.cpp
src/rolling.cpp
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
// Copyright (c) 2019, Map IV, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// * 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.
// * Neither the name of the Map IV, Inc. nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// 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 COPYRIGHT HOLDER 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.

#ifndef ANGULAR_VELOCITY_OFFSET_STOP_HPP
#define ANGULAR_VELOCITY_OFFSET_STOP_HPP

#include <deque>

#include <Eigen/Core>
#include <Eigen/Dense>

#include <yaml-cpp/yaml.h>

#include <eagleye_msgs/AngularVelocityOffset.h>

struct AngularVelocityOffsetStopParameter
{
size_t buffer_size;
double velocity_stop_judgement_threshold;
double angular_stop_judgement_threshold;

void load(const std::string& yaml_file)
{
try
{
YAML::Node conf = YAML::LoadFile(yaml_file);

double imu_rate = conf["common"]["imu_rate"].as<double>();
double estimated_interval = conf["angular_velocity_offset_stop"]["estimated_interval"].as<double>();
this->buffer_size = imu_rate * estimated_interval;
this->velocity_stop_judgement_threshold = conf["common"]["stop_judgement_threshold"].as<double>();
this->angular_stop_judgement_threshold = conf["angular_velocity_offset_stop"]["outlier_threshold"].as<double>();
}
catch (YAML::Exception& e)
{
std::cerr << "\033[1;31mAngularVelocityOffsetStopParameter YAML Error: " << e.msg << "\033[m" << std::endl;
exit(3);
}
}
};

struct AngularVelocityOffsetStopStatus
{
bool is_estimated_now;
bool is_estimation_started;
Eigen::Vector3d offset_stop;
};

class AngularVelocityOffsetStopEstimator
{
public:
AngularVelocityOffsetStopEstimator();
void setParameter(const AngularVelocityOffsetStopParameter& param);
void velocityCallback(const Eigen::Vector3d& velocity);
AngularVelocityOffsetStopStatus imuCallback(const Eigen::Vector3d& angular_velocity);

private:
// Param
AngularVelocityOffsetStopParameter param_;
// Flags
bool is_estimation_started_;
bool is_velocity_ready_;

// Angular velocity
Eigen::Vector3d estimated_offset_stop_;
std::deque<Eigen::Vector3d> angular_velocity_buffer_;
size_t buffer_size_;
double angular_stop_judgement_threshold_;

// Velocity
Eigen::Vector3d reserved_velocity_;
double velocity_stop_judgement_threshold_;
};

#endif /* ANGULAR_VELOCITY_OFFSET_STOP_HPP */
Loading

0 comments on commit 9772b33

Please sign in to comment.