-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add amcl3 demo #9
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Pablo Vela <pablovela@naver.com>
Signed-off-by: Pablo Vela <pablovela@naver.com>
Signed-off-by: Pablo Vela <pablovela@naver.com>
Signed-off-by: Pablo Vela <pablovela@naver.com>
Signed-off-by: Pablo Vela <pablovela@naver.com>
Signed-off-by: Pablo Vela <pablovela@naver.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First pass
docker/files/jazzy_base.repos
Outdated
repositories: | ||
beluga: | ||
type: git | ||
url: https://github.com/pvela2017/beluga.git |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pvela2017 this needs to change before merging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can now point to the main repository.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed in 623f842
docker/images/jazzy/Dockerfile
Outdated
libopenvdb-dev \ | ||
python3-pip \ | ||
mc \ | ||
ros-jazzy-pcl-ros \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pvela2017 why adding this here instead of in the corresponding package.xml
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed in 150be6e
] | ||
|
||
return LaunchDescription(nodes) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pvela2017 nit: missing EOF newline, here and elsewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -0,0 +1,63 @@ | |||
#!/usr/bin/env python3 | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pvela2017 meta: I wonder if it wouldn't be simpler to modify the dataset (which we have already modified) to include odom
to base_link
transforms.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will try
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did we do this or not @pvela2017?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to implement this on an other project. But there when playing the bag there was a warning about the timestamp. I dont know if it is a bug or I did something wrong. I will try again for this project
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its working! How can I send you the new rosbag?
Updated in 5978183
|
||
// Initial position | ||
const auto pose = Sophus::SE3d{ | ||
Sophus::SO3d{/*kInitialPoseYaw, kInitialPosePitch, kInitialPoseRoll*/}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pvela2017 nit: remove commented out code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed in 64e5615
point_color.b = 1.0; | ||
point_color.a = 1.0; | ||
|
||
for (openvdb::FloatGrid::ValueOnCIter iter = grid->cbeginValueOn(); iter; ++iter) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pvela2017 the condition expression is unusual, is there no cendValueOn()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed in the meeting it is ok.
OpenVDB iterators are not STL-compatible in that one can always request an iterator that points to the beginning of a collection of elements (nodes, voxels, etc.), but one usually cannot request an iterator that points to the end of the collection. (This is because finding the end might require a full tree traversal.)
visualization_msgs::msg::Marker marker_msg; | ||
std_msgs::msg::ColorRGBA point_color; | ||
openvdb::CoordBBox bbox = grid->evalActiveVoxelBoundingBox(); | ||
double min_z, max_z; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pvela2017 nit: better define and assign on the same line, then it can be const
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed in 64e5615
marker_msg.colors.push_back(point_color); | ||
} | ||
|
||
double size = grid->transform().voxelSize()[0]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pvela2017 nit: can be const
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed in 64e5615
"localization/beluga_demo_bearing_localization" | ||
"localization/beluga_demo_fiducial_localization" | ||
"localization/beluga_demo_lidar_localization" | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pvela2017 I'm a bit ambivalent about this, but I can't think of a better solution. CC @glpuga for thoughts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ping @glpuga
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like it. I'm assuming these don't build or have missing dependencies in Jazzy.
Why supporting anything other than Humble, if this is a demos repository and we provide a docker to run it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why supporting anything other than Humble, if this is a demos repository and we provide a docker to run it?
Because OpenVDB packaging is broken in Ubuntu 22.04, see https://bugs.launchpad.net/ubuntu/+source/openvdb/+bug/1970108.
Nav2 folks realized about this and vendored it (see openvdb_vendor
) but depending on their vendored version means we are (again) subject to their own release timeline to release ourselves. There is no good solution.
I'm assuming these don't build or have missing dependencies in Jazzy.
Thinking out loud, and this is out of scope for this PR but, Humble is the old LTS distro. Jazzy is new LTS distro. Having some our demos be incompatible with the latest LTS distro of ROS 2 is not good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I remember now.
Jazzy is new LTS distro. Having some our demos be incompatible with the latest LTS distro of ROS 2 is not good.
I'm not so absolute. People are still by far mostly using Humble, while Jazzy is at best "up-and-coming" right now. Core stuff should support both already, but leaf-stuff -like this self-contained demos repo- does not need to.
In any case, there's no reason I can think off the top of my head why these would not build in Jazzy. Is there any external dependency not available?
Looking at the package.xml files, everything seems either standard packages or packages with code we wrote ourselves. Indirect dependencies might be gazebo (classic?) and apriltag_ros which we use the "foxy-devel" branch (because there's no other).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, https://github.com/ROBOTIS-GIT/turtlebot3_simulations has not seen a release since Humble and it doesn't look like it will ever do. Nav2 folks spinned up https://github.com/ros-navigation/nav2_minimal_turtlebot_simulation in place for it. Some of our demos already depend on Nav2 code, so I'll go ahead and use this for both Humble and Jazzy. It's source distributed anyways.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In any case, there's no reason I can think off the top of my head why these would not build in Jazzy. Is there any external dependency not available?
@pvela2017 ? I think it was Gazebo related, though my memory might be failing me. Isn't Gazebo Classic gone?
Edit: https://discourse.ros.org/t/gazebo-classic-end-of-life-ros-2-jazzy/36239 indeed.
I dont remember if I reached that step were Gazebo was an issue.
So, https://github.com/ROBOTIS-GIT/turtlebot3_simulations has not seen a release since Humble and it doesn't look like it will ever do. Nav2 folks spinned up https://github.com/ros-navigation/nav2_minimal_turtlebot_simulation in place for it. Some of our demos already depend on Nav2 code, so I'll go ahead and use this for both Humble and Jazzy. It's source distributed anyways.
I remember this was one of the issues. Also, I removed a lot of dependencies so the rosdep wouldn't pop errors.
So, Should we update everything to Gazebo ignition?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we update everything to Gazebo ignition?
@pvela2017 indeed. I'm on it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we update everything to Gazebo ignition?
@pvela2017 indeed. I'm on it.
Can I help?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure! I'll tag you on the PR as soon as it is up for review. If you can then adjust this PR for it, that'd be amazing.
Signed-off-by: Pablo Vela <pablovela@naver.com>
Signed-off-by: Pablo Vela <pablovela@naver.com>
Signed-off-by: Pablo Vela <pablovela@naver.com>
Signed-off-by: Pablo Vela <pablovela@naver.com>
Signed-off-by: Pablo Vela <pablovela@naver.com>
@pvela2017 Ekumen-OS/beluga#440 got merged. Are you still up for wrapping this up? |
Yep! I'm here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job. Left a couple final comments but I'm overall satisfied with this PR.
@@ -0,0 +1,63 @@ | |||
#!/usr/bin/env python3 | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did we do this or not @pvela2017?
const std::string kMapFile = | ||
"/home/developer/ws/src/beluga_demo/localization/" | ||
"beluga_demo_amcl3_localization/maps/map.vdb"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pvela2017 consider installing map.vdb
under share
. Then you can use ament_index_cpp::get_package_share_directory
to find it instead of hard-coding the path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated in 8d7f101
Signed-off-by: Pablo Vela <pablovela@naver.com>
Signed-off-by: Pablo Vela <pablovela@naver.com>
Signed-off-by: Pablo Vela <pablovela@naver.com>
Signed-off-by: Pablo Vela <pablovela@naver.com>
Signed-off-by: Pablo Vela <pablovela@naver.com>
Signed-off-by: Pablo Vela <pablovela@naver.com>
Proposed changes
Added a demo for the AMCL3 algorithm based on the likelihood sensor model 3D (Ekumen-OS/beluga#440)
Type of change
Checklist
Put an
x
in the boxes that apply. This is simply a reminder of what we will require before merging your code.Additional comments