Skip to content

Commit

Permalink
Merge pull request #170 from usdot-fhwa-stol/release/yenko
Browse files Browse the repository at this point in the history
Release 3.7.0
  • Loading branch information
msmcconnell authored Aug 9, 2021
2 parents bbf23fe + e06e45f commit 155f174
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
# Pull docker image from docker hub
# XTERM used for better catkin_make output
docker:
- image: usdotfhwastol/carma-base:carma-system-3.6.0
- image: usdotfhwastol/carma-base:carma-system-3.7.0
user: carma
environment:
TERM: xterm
Expand Down
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
FROM usdotfhwastol/carma-base:carma-system-3.6.0 as build
FROM usdotfhwastol/carma-base:carma-system-3.7.0 as base_image

FROM base_image as build

COPY --chown=carma . /home/carma/autoware.ai
RUN /home/carma/autoware.ai/docker/checkout.bash
RUN ./home/carma/autoware.ai/docker/install.sh

FROM usdotfhwastol/carma-base:carma-system-3.6.0
FROM base_image

ARG BUILD_DATE="NULL"
ARG VCS_REF="NULL"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class LocalFrameProjector : public Projector
/**
* [LocalFrameProjector::projectECEF projects between WGS-84 ECEF and local map]
* @param ecef_point [point with x,y,z in ecef information]
* @param proj_dir [1 for forward -1 for reverse]
* @param proj_dir [1 for forward (output is in ecef) -1 for reverse (output is in map)]
* @return [projected point in local map coordinate]
* @throw std::invalid_argument [if direction is neither of 1 (forward) or -1 (reverse)]
*/
Expand All @@ -59,14 +59,15 @@ class LocalFrameProjector : public Projector
*/
GPSPoint reverse(const BasicPoint3d& p) const override;

// The PROJ string used to define a WGS-84 ECEF frame
static constexpr char ECEF_PROJ_STR[] = "+proj=geocent +ellps=WGS84 +datum=WGS84 +units=m +no_defs";

private:

PJ *P_;

const std::string map_proj_string_;

// The PROJ string used to define a WGS-84 ECEF frame
static constexpr char ECEF_PROJ_STR[] = "+proj=geocent +ellps=WGS84 +datum=WGS84 +units=m +no_defs";
};

} // namespace projection
Expand Down
5 changes: 5 additions & 0 deletions common/map_file/launch/map_param_loader.launch
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ the License.

<launch>
<arg name="file_name"/>
<arg name="broadcast_earth_frame" default="false"
doc="If true this node will attempt to compute a homogenious transformation matrix between earth and the map frame origin.
NOTE: Not all projections can be linearly described in this way and such a transformation may be inaccurate."/>

<node pkg="map_file" type="map_param_loader" name="map_param_loader">
<param name = "file_name" value = "$(arg file_name)"/>
<param name = "broadcast_earth_frame" value = "$(arg broadcast_earth_frame)"/>
</node>
</launch>
13 changes: 9 additions & 4 deletions common/map_file/nodes/map_param_loader/map_param_loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,21 @@ int main(int argc, char **argv)
int projector_type = 1; // default value
std::string target_frame, lanelet2_filename;
private_nh.param<std::string>("file_name", lanelet2_filename, "");

bool broadcast_earth_frame = false;
private_nh.param<bool>("broadcast_earth_frame", broadcast_earth_frame, broadcast_earth_frame);


// Parse geo reference info from the lanelet map (.osm)
lanelet::io_handlers::AutowareOsmParser::parseMapParams(lanelet2_filename, &projector_type, &target_frame);

// Get the transform to ecef (when parsed target_frame is map_frame)
tf2::Transform tf = map_param_loader::getTransform(target_frame);
if (broadcast_earth_frame) {
// Get the transform to ecef (when parsed target_frame is map_frame)
tf2::Transform tf = map_param_loader::getTransform(target_frame);

// Broadcast the transform
map_param_loader::broadcastTransform(tf);
// Broadcast the transform
map_param_loader::broadcastTransform(tf);
}

// Broadcast the georeference
ros::Publisher georef_pub = private_nh.advertise<std_msgs::String>("georeference", 1, true);
Expand Down
4 changes: 2 additions & 2 deletions docker/checkout.bash
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ done
cd ${dir}/autoware.ai

if [[ "$BRANCH" = "carma-develop" ]]; then
git clone --depth=1 https://github.com/usdot-fhwa-stol/carma-msgs.git --branch develop
git clone --depth=1 https://github.com/usdot-fhwa-stol/carma-msgs.git --branch carma-system-3.7.0
else
git clone --depth=1 https://github.com/usdot-fhwa-stol/carma-msgs.git --branch carma-system-3.6.0
git clone --depth=1 https://github.com/usdot-fhwa-stol/carma-msgs.git --branch carma-system-3.7.0
fi

0 comments on commit 155f174

Please sign in to comment.