nobleo / full_coverage_path_planner

Full coverage path planning provides a move_base_flex plugin that can plan a path that will fully cover a given area
Apache License 2.0
528 stars 147 forks source link

Trying to get this package installed and running #8

Closed ryleymcc closed 3 years ago

ryleymcc commented 3 years ago

When I follow your install instructions and run the command sudo catkin build full_coverage_path_planner --catkin-make-args run_tests It says this The build space at '/home/ryley/catkin_ws/build' was previously built by 'catkin_make'. Please remove the build space or pick a different build space. Please advise

ryleymcc commented 3 years ago

Deleted my build and devel directory and ran catkin build then ran sudo catkin build full_coverage_path_planner --catkin-make-args run_tests successfully.

ryleymcc commented 3 years ago

Issues when I run the command roslaunch full_coverage_path_planner test_full_coverage_path_planner.launch from the readme.

RVIS launches and the map does not load.

Screenshot from 2020-12-10 03-36-16

And some errors in the terminal. Here is part of the terminal

`ROS_MASTER_URI=http://localhost:11311

ERROR: cannot launch node of type [mbf_costmap_nav/mbf_costmap_nav]: mbf_costmap_nav ROS path [0]=/opt/ros/noetic/share/ros ROS path [1]=/home/ryley/catkin_ws/src/mobile_robot_simulator ROS path [2]=/home/ryley/catkin_ws/src/tracking_pid ROS path [3]=/home/ryley/catkin_ws/src/full_coverage_path_planner ROS path [4]=/home/ryley/catkin_ws/src/turtlebot3/turtlebot3 ROS path [5]=/home/ryley/catkin_ws/src/turtlebot3/turtlebot3_description ROS path [6]=/home/ryley/catkin_ws/src/turtlebot3_simulations/turtlebot3_gazebo ROS path [7]=/home/ryley/catkin_ws/src/turtlebot3_msgs ROS path [8]=/home/ryley/catkin_ws/src/turtlebot3/turtlebot3_bringup ROS path [9]=/home/ryley/catkin_ws/src/turtlebot3/turtlebot3_example ROS path [10]=/home/ryley/catkin_ws/src/turtlebot3_simulations/turtlebot3_fake ROS path [11]=/home/ryley/catkin_ws/src/turtlebot3/turtlebot3_navigation ROS path [12]=/home/ryley/catkin_ws/src/turtlebot3_simulations/turtlebot3_simulations ROS path [13]=/home/ryley/catkin_ws/src/turtlebot3/turtlebot3_slam ROS path [14]=/home/ryley/catkin_ws/src/turtlebot3/turtlebot3_teleop ROS path [15]=/opt/ros/noetic/share ERROR: cannot launch node of type [mbf_costmap_nav/move_base_legacy_relay.py]: mbf_costmap_nav ROS path [0]=/opt/ros/noetic/share/ros ROS path [1]=/home/ryley/catkin_ws/src/mobile_robot_simulator ROS path [2]=/home/ryley/catkin_ws/src/tracking_pid ROS path [3]=/home/ryley/catkin_ws/src/full_coverage_path_planner ROS path [4]=/home/ryley/catkin_ws/src/turtlebot3/turtlebot3 ROS path [5]=/home/ryley/catkin_ws/src/turtlebot3/turtlebot3_description ROS path [6]=/home/ryley/catkin_ws/src/turtlebot3_simulations/turtlebot3_gazebo ROS path [7]=/home/ryley/catkin_ws/src/turtlebot3_msgs ROS path [8]=/home/ryley/catkin_ws/src/turtlebot3/turtlebot3_bringup ROS path [9]=/home/ryley/catkin_ws/src/turtlebot3/turtlebot3_example ROS path [10]=/home/ryley/catkin_ws/src/turtlebot3_simulations/turtlebot3_fake ROS path [11]=/home/ryley/catkin_ws/src/turtlebot3/turtlebot3_navigation ROS path [12]=/home/ryley/catkin_ws/src/turtlebot3_simulations/turtlebot3_simulations ROS path [13]=/home/ryley/catkin_ws/src/turtlebot3/turtlebot3_slam ROS path [14]=/home/ryley/catkin_ws/src/turtlebot3/turtlebot3_teleop ROS path [15]=/opt/ros/noetic/share process[mobile_robot_simulator-3]: started with pid [68938] ERROR: cannot launch node of type [map_server/map_server]: map_server ROS path [0]=/opt/ros/noetic/share/ros ROS path [1]=/home/ryley/catkin_ws/src/mobile_robot_simulator ROS path [2]=/home/ryley/catkin_ws/src/tracking_pid ROS path [3]=/home/ryley/catkin_ws/src/full_coverage_path_planner ROS path [4]=/home/ryley/catkin_ws/src/turtlebot3/turtlebot3 ROS path [5]=/home/ryley/catkin_ws/src/turtlebot3/turtlebot3_description ROS path [6]=/home/ryley/catkin_ws/src/turtlebot3_simulations/turtlebot3_gazebo ROS path [7]=/home/ryley/catkin_ws/src/turtlebot3_msgs ROS path [8]=/home/ryley/catkin_ws/src/turtlebot3/turtlebot3_bringup ROS path [9]=/home/ryley/catkin_ws/src/turtlebot3/turtlebot3_example ROS path [10]=/home/ryley/catkin_ws/src/turtlebot3_simulations/turtlebot3_fake ROS path [11]=/home/ryley/catkin_ws/src/turtlebot3/turtlebot3_navigation ROS path [12]=/home/ryley/catkin_ws/src/turtlebot3_simulations/turtlebot3_simulations ROS path [13]=/home/ryley/catkin_ws/src/turtlebot3/turtlebot3_slam ROS path [14]=/home/ryley/catkin_ws/src/turtlebot3/turtlebot3_teleop ROS path [15]=/opt/ros/noetic/share process[interpolator-5]: started with pid [68939] process[controller-6]: started with pid [68940] process[map_to_coveragemap-7]: started with pid [68945] process[coverage_progress-8]: started with pid [68947] process[publish_simple_goal-9]: started with pid [68952] process[rviz-10]: started with pid [68960] [ INFO] [1607593701.636345605]: CONTROLLER PARAMETERS

[ INFO] [1607593701.636921787]: Controller enabled: 1 [ INFO] [1607593701.636938776]: Controller DEBUG enabled: 1 [ INFO] [1607593701.636958879]: Distance L: 0.500000

[ INFO] [1607593701.637007540]: Longitudinal gains: (Kp: 2.000000, Ki, 0.000000, Kd, 0.500000) [ INFO] [1607593701.637024456]: Lateral gains: (Kp: 4.000000, Ki, 0.000000, Kd, 0.300000) [ INFO] [1607593701.637041695]: Angular gains: (Kp: 1.000000, Ki, 0.000000, Kd, 0.300000) [ INFO] [1607593701.637057508]: Robot type (holonomic): (0) [ INFO] [1607593701.637071762]: Track base link: (1) [ INFO] [1607593701.637086493]: LPF cutoff frequency: 1/4 of sampling rate [ INFO] [1607593701.637103241]: Integral-windup limit: 1000.000000 [ INFO] [1607593701.637119811]: Saturation limits xy: 10.000000/-10.000000 [ INFO] [1607593701.637136340]: Saturation limits ang: 10.000000/-10.000000 [ INFO] [1607593701.637151447]: map frame: [ INFO] [1607593701.637166558]: base_link frame:

[ INFO] [1607593701.714294477]: Initialized mobile robot simulator [ INFO] [1607593701.714780403]: --- Starting MobileRobot simulator [ INFO] [1607593701.814985436]: Started mobile robot simulator update loop, listening on cmd_vel topic [ INFO] [1607593702.047262850]: Transform between map and base_link found Exception in thread Thread-6: Traceback (most recent call last): File "/opt/ros/noetic/lib/python3/dist-packages/nav_msgs/msg/_OccupancyGrid.py", line 139, in serialize buff.write(struct.Struct(pattern).pack(*self.data)) struct.error: required argument is not an integer

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/opt/ros/noetic/lib/python3/dist-packages/rospy/topics.py", line 882, in publish self.impl.publish(data) File "/opt/ros/noetic/lib/python3/dist-packages/rospy/topics.py", line 1066, in publish serialize_message(b, self.seq, message) File "/opt/ros/noetic/lib/python3/dist-packages/rospy/msg.py", line 152, in serialize_message msg.serialize(b) File "/opt/ros/noetic/lib/python3/dist-packages/nav_msgs/msg/_OccupancyGrid.py", line 140, in serialize except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self))))) File "/opt/ros/noetic/lib/python3/dist-packages/genpy/message.py", line 383, in _check_types check_type(n, t, getattr(self, n)) File "/opt/ros/noetic/lib/python3/dist-packages/genpy/message.py", line 302, in check_type raise SerializationError('field %s must be a list or tuple type' % field_name) genpy.message.SerializationError: field data must be a list or tuple type

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner self.run() File "/opt/ros/noetic/lib/python3/dist-packages/rospy/timer.py", line 234, in run self._callback(TimerEvent(last_expected, last_real, current_expected, current_real, last_duration)) File "/home/ryley/catkin_ws/src/full_coverage_path_planner/nodes/coverage_progress", line 136, in _update_callback self.grid_pub.publish(self.grid) File "/opt/ros/noetic/lib/python3/dist-packages/rospy/topics.py", line 886, in publish raise ROSSerializationException(str(e)) rospy.exceptions.ROSSerializationException: field data must be a list or tuple type `

ryleymcc commented 3 years ago

I'm going to guess and say that running catkin build has isolated this package from its dependencies. Not sure tho since I'm new to linux and ros and catkin. I'm going to try to find another package but lmk if you can help with this.

ryleymcc commented 3 years ago

I ran sudo catkin clean -y and catkin build and i got errors from this package.

`Starting >>> full_coverage_path_planner

Warnings << full_coverage_path_planner:make /home/ryley/catkin_ws/logs/full_coverage_path_planner/build.make.000.log /home/ryley/catkin_ws/src/full_coverage_path_planner/src/common.cpp: In function ‘bool a_star_to_open_space(const std::vector<std::vector >&, gridNode_t, int, std::vector<std::vector >&, const std::__cxx11::list&, std::__cxx11::list&)’:

/home/ryley/catkin_ws/src/full_coverage_path_planner/src/common.cpp:140:29: warning: narrowing conversion of ‘(((uint)nn.std::vector::back().gridNode_t::pos.Point_t::x) + dx)’ from ‘uint’ {aka ‘unsigned int’} to ‘int’ [-Wnarrowing] 140 | nn.back().pos.x + dx, | ~~~~^~~~

/home/ryley/catkin_ws/src/full_coverage_path_planner/src/common.cpp:141:29: warning: narrowing conversion of ‘(((uint)nn.std::vector::back().gridNode_t::pos.Point_t::y) + dy)’ from ‘uint’ {aka ‘unsigned int’} to ‘int’ [-Wnarrowing] 141 | nn.back().pos.y + dy, | ~~~~^~~~

/home/ryley/catkin_ws/src/full_coverage_path_planner/src/common.cpp:166:80: warning: narrowing conversion of ‘(((uint)((cost + nn.std::vector::back().gridNode_t::cost) + distanceToClosestPoint(p2, (* & open_space)))) + i)’ from ‘uint’ {aka ‘unsigned int’} to ‘int’ [-Wnarrowing] 166 | cost + nn.back().cost + distanceToClosestPoint(p2, open_space) + i, | ~~~~~~~~~~~~~^ cd /home/ryley/catkin_ws/build/full_coverage_path_planner; catkin build --get-env full_coverage_path_planner | catkin env -si /usr/bin/make --jobserver-auth=3,4; cd - ............................................................................................................... Finished <<< full_coverage_path_planner [ 5.4 seconds ]
[build] Summary: All 15 packages succeeded!
[build] Ignored: None.
[build] Warnings: 2 packages succeeded with warnings.
[build] Abandoned: None.
[build] Failed: None.
[build] Runtime: 26.2 seconds total.
[build] Note: Workspace packages have changed, please re-source setup files to use them.`

amyjohansson1994 commented 3 years ago

@ryleymcc I might be late to this.

  1. You do not have to build using catkin build, just do catkin_make without any arguments.
  2. I preferred having setup the move_base_flex (whole of navstack actually) for my gazebo environment along with SLAM and then test the package.
Timple commented 3 years ago

A bug was fixed which resulted in the launchfile not working.

Assuming this works now :slightly_smiling_face: