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

ROS 2 rework roadmap #135

Open
15 of 37 tasks
jlblancoc opened this issue Aug 13, 2023 · 10 comments
Open
15 of 37 tasks

ROS 2 rework roadmap #135

jlblancoc opened this issue Aug 13, 2023 · 10 comments

Comments

@jlblancoc
Copy link
Member

jlblancoc commented Aug 13, 2023

List of goals for the ROS 2 transition. It will not only be a port of old ROS 1 packages, but a refactoring with the learned experience:

Each package subdirectory should have a README.md with all the relevant documentation: parameters, topics, etc.

  • mrpt_local_obstacles => mrpt_pointcloud_pipeline: Sensor inputs to basic / decimated point cloud.

  • mrpt_msgs_bridge: C++ library to convert msgs to C++ classes, for those messages defined in mrpt_msgs and hence not possible to include into mrpt::ros2bridge:

    • Port to ROS 2
    • Write tests
  • mrpt_map: Read maps from file and publishes them.

    • Port existing ROS1 version to ROS 2
    • Offer a ROS service to dynamically load/reload the map.
    • Write tests
    • Improve so it can read other map types: pointclouds, octomaps, etc.
  • Old ROS 1 mrpt_localization should be renamed ==> mrpt_pf_localization: Uses particle filter methods to localize

    • Port old ROS 1 version to ROS 2
    • Rename package in all places where it's used: mrpt_localization ==> mrpt_pf_localization
    • Write tests
    • Expose and document the different options of particle filter algorithms that exist.
    • Add a service or topic to allow switching the map (TBD). cc: how to switch to a new map when running mrpt_localization_node? #123
    • Expose a localization quality metric. cc Localization Metric #122
    • Write demos of localization using as map:
      • Occupancy grid map.
      • Point cloud.
  • Create new package mrpt_opt_localization: Uses optimization-based localization:

    • Write new node. It should:
      • Optimize the pose by maximizing the observation likelihood of one or more sensors (2D and 3D lidars, RGBD, etc.) against a 2D or 3D grid or pointcloud.
      • Optionally: Fuse with wheels odometry
      • Optionally: fuse with IMU
      • Optionally: fuse with GNNS
    • Write tests
    • Write demos of localization using as map:
      • Occupancy grid map.
      • Point cloud.
  • mrpt_rawlog: Nodes to record .rawlog and play .rawlog.

  • mrpt_reactivenav2d: The pure reactive method with a 2D robot shape for planar motion.

    • Port existing ROS1 version to ROS 2. Probably reuse code from mrpt/rosbag2rawlog app.
    • Write tests/demos
  • mrpt_tutorials: Probably, rename to ==> mrpt_navigation_tutorials

    • Port existing ROS1 version to ROS 2.
  • mrpt_tps_astar_planner: New A* planner

Other tasks:

  • Add proper CI and branch rules. Use these Docker images: https://hub.docker.com/r/osrf/ros/tags
  • When all/most of the above are done, switch the main branch of this repo to ros2 and mark ros1 as obsolete.
  • Make the first ROS 2 release to all active distros.
@jlblancoc
Copy link
Member Author

cc: @SRai22 Here we are... :-)

@SRai22
Copy link
Member

SRai22 commented Aug 23, 2023

Check and document what sensor types are supported. Check if #121 is already handled.

Currently we are handling both inputs, sensor_msgs::msg::LaserScan and sensor_msgs::msg::PointCloud2 in mrpt_local_obstacles.

@jlblancoc
Copy link
Member Author

CI is now setup and working, and commits to the main "ros2" branch should now go thru PRs that pass the tests!
Latest one is #139 , still WIP due to a large refactoring work in progress, will merge when the CI tests pass, that will mean it builds ok on all ROS2 distros 😄

@KatoROSTeam
Copy link

When can we Expect the mrpt_pf_localization

@jlblancoc
Copy link
Member Author

jlblancoc commented Nov 6, 2023

It's for sure one of my top priorities... but I'm almost done finishing first a brand new Lidar-SLAM package that will generate maps for these localization packages, so this one is enqueued at present...

I definitively want both works to be out by December...

PS: I'll post updates on my LinkedIn profile, as usual.

@jlblancoc
Copy link
Member Author

Finally back to this project...
These updated READMEs explain the new way metric maps are to be handled:

(More news soon...)

@KatoROSTeam
Copy link

Great to see you back here! Hoping mrpt_pf_localization will release on this December. @jlblancoc

@jlblancoc
Copy link
Member Author

Hi @KatoROSTeam :
Officially releasing so users can install it via "apt install..." will take some more weeks, since there is a long queue of pending tasks to publish all the related packages (mola_common, mp2p_icp, etc.) and the ROS infrastructure guys are not moving things forwards these days (they also have the right to rest in holidays!).

But you can test it if built locally. Basic pf-localization, with a 2D gridmap and a 2D lidar, is already working ok for ROS2 and there is a demo ready to test: https://github.com/mrpt-ros-pkg/mrpt_navigation/tree/ros2/mrpt_pf_localization#demos
with a video of the result here: https://mrpt.github.io/videos/pf_localization_demo_2dgrid_mvsim.mp4

To build locally, prepare a ROS2 workspace as usual, and clone in its src:

Hope it helps.

@KatoROSTeam
Copy link

Hi @jlblancoc , In mrpt_pf_localization_node.cpp, i can find that lot of functions that required to localize on a given map are stopped from running using the #if 0 like below example,

	CObservationOdometry::Ptr& _odometry,
	const std_msgs::msg::Header& _msg_header)
{
#if 0
	std::string base_frame_id = param()->base_frame_id;
	std::string odom_frame_id = param()->odom_frame_id;
	mrpt::poses::CPose3D poseOdom;
	if (this->waitForTransform(
			poseOdom, odom_frame_id, base_frame_id, _msg_header.stamp,
			ros::Duration(1.0)))
	{
		_odometry = CObservationOdometry::Create();
		_odometry->sensorLabel = odom_frame_id;
		_odometry->hasEncodersInfo = false;
		_odometry->hasVelocities = false;
		_odometry->odometry.x() = poseOdom.x();
		_odometry->odometry.y() = poseOdom.y();
		_odometry->odometry.phi() = poseOdom.yaw();
	}
#endif
}

Also the localization launch also not providing map frame as well. How to fix this

@jlblancoc
Copy link
Member Author

@KatoROSTeam This package is now working on a daily basis on our robots, so you could use it now.

@SRai22 I started importing our TPS A* planner into a new branch, and will try to port it to ROS 2 asap ;-)

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

No branches or pull requests

3 participants