-
Clone this repository, and build the workspace with: $colcon build
-
Source the setup files: $source /opt/ros/humble/setup.bash $source ~/{your_workspace}/install/setup.bash
-
Run the transformbroadcaster node, for static tftree transform: $ros2 run amr_pkg transformbroadcaster
-
Open RVIZ: $ros2 run rviz2 rviz2
-
Run the orderoptimizer node with the directory_path parameter: $ros2 run amr_pkg orderoptimizer --ros-args -p directory_path:=path/to/your/directory Eg: "/home/rahul/Downloads/amr_example_ROS/applicants_amr_example_1", where it contains orders and configuration
-
Publish on topic '/currentPosition' only once at begining before the first order to initialise the AMR's positon, as later on it uses a global variable to update the position: $ros2 topic pub -1 /currentPosition geometry_msgs/msg/PoseStamped "{ header: { stamp: { sec: 0, nanosec: 0 }, frame_id: 'map' }, pose: { position: { x: 25.0, y: 300.0, z: 0.0 }, orientation: { x: 0.0, y: 0.0, z: 0.0, w: 1.0 } } }"
-
Publish on topic '/nextOrder': $ros2 topic pub -1 /nextOrder interfaces/msg/Order "{order_id: 1300020, description: 'This is a sample order description'}"
Note: If you encounter this error "CMake Error: The current CMakeCache.txt directory /home/rahul/AMR_Order_Pickup/build/interfaces/CMakeCache.txt is different than the directory...", just delete the build, log, install folders and rebuild the workspace.