Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated code from the summer #194

Open
wants to merge 69 commits into
base: development
Choose a base branch
from
Open

Updated code from the summer #194

wants to merge 69 commits into from

Conversation

Andeshog
Copy link
Contributor

Cleaning up the summer code from Njord and removing unused packages.

Mokaz and others added 30 commits April 28, 2024 20:19
Added functionality to map walls into the grid. Wall width mapped to grid is customizable through param in landmark server
Signed-off-by: Christopher Strøm <[email protected]>
control logic for the asv to navigate through the initial buoy formation of the docking task
Signed-off-by: Christopher Strøm <[email protected]>
Added base njord task node that other tasks will inherit from
@Andeshog Andeshog requested a review from alekskl01 August 17, 2024 11:39
@Andeshog Andeshog self-assigned this Aug 17, 2024
Copy link
Contributor

@alekskl01 alekskl01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not the most thorough of code reviews, but the structure of the repository is a mess and should be restructured and split up if any further work is planned for the ASV.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to keep this

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sitaw folder should be restructured, add polygons in their own folder, params somewhere else

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the ASV is to be worked on further, please split it into a better repo structure.

Comment on lines 362 to 363
# if not isinstance(path, Path):
# raise TypeError("path must be an instance of Path")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove unused comments

@@ -66,7 +99,7 @@ def calculate_coriolis_matrix(nu: np.ndarray) -> np.ndarray:
[0, 0, 5.5],
[82.5, -5.5, 0]
])
return C_A @ nu
return (C_A @ nu) * 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this set to zero?

Comment on lines 116 to 135
sensor_msgs::msg::PointCloud2 cluster_msg;
pcl::toROSMsg(cluster, cluster_msg);
cluster_msg.header.frame_id = get_parameter("fixed_frame").as_string();
cluster_publisher_->publish(cluster_msg);
pcl::PointCloud<pcl::PointXYZ> convex_hull;
pcl::ConvexHull<pcl::PointXYZ> chull;
chull.setDimension(2);
chull.setInputCloud(cluster.makeShared());
chull.reconstruct(convex_hull);
sensor_msgs::msg::PointCloud2 hull_msg;
pcl::toROSMsg(convex_hull, hull_msg);
hull_msg.header.frame_id = get_parameter("fixed_frame").as_string();
convex_hull_publisher_->publish(hull_msg);
Eigen::Array<float, 2, Eigen::Dynamic> hull(2, convex_hull.size());
for (size_t i = 0; i < convex_hull.size(); i++) {
hull(0, i) = convex_hull.points[i].x;
hull(1, i) = convex_hull.points[i].y;
}
return hull;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this code block is a bit dense

vortex_msgs::msg::OdometryArray filteredLandmarksOdoms;

for (const auto &landmark : storedLandmarks_->landmarks) {

if (goal->landmark_types.empty() && distance == 0.0) {
if (filter_type == 6 && distance == 0.0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is filter_type 6? why is it an integer?

Comment on lines 13 to 15
# map_origin_lat: 0.0
# map_origin_lon: 0.0
# use_predef_map_origin: false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove if not used

map_manager_node:
ros__parameters:
use_predef_landmask: true
landmask_file: "src/vortex-asv/mission/map_manager/params/land_polygon.yaml"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this does not seem to be used as the path is incorrect. I would also think there would be better ways of doing this from the launch file.

Comment on lines 226 to 230
// 63.44098584906518, 10.42304390021551
// 63.41490901857848, 10.398215601285054
// Office traffic centre origin
// map_origin_lat_ = 63.41490901857848;
// map_origin_lon_ = 10.398215601285054;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove if not used

@Andeshog Andeshog assigned jorgenfj and unassigned Andeshog Aug 17, 2024
@alekskl01 alekskl01 assigned Andeshog and unassigned jorgenfj Aug 17, 2024
@Andeshog
Copy link
Contributor Author

@jorgenfj

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants