-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Hello @renan028,
first of all, thank you for sharing your work!
I'm running a clean build of Ubuntu 20 with ROS2 Foxy. I've cloned your repository and first thing that I've encountered is compilation problem:
Click for details
```console Finished <<< webots_ros2 [1.00s] --- stderr: tiago_webots_ros2 /home/user/ros2_workspace/tiago_webots_ws/src/tiago_webots_ros2/src/robot_task.cc:68:6: error: no declaration matches ‘void tiago_webots_ros::RobotTask::enableGPS()’ 68 | void RobotTask::enableGPS() { | ^~~~~~~~~ /home/user/ros2_workspace/tiago_webots_ws/src/tiago_webots_ros2/src/robot_task.cc:68:6: note: no functions named ‘void tiago_webots_ros::RobotTask::enableGPS()’ In file included from /home/user/ros2_workspace/tiago_webots_ws/src/tiago_webots_ros2/src/robot_task.cc:1: /home/user/ros2_workspace/tiago_webots_ws/src/tiago_webots_ros2/include/tiago_webots_ros2/robot_task.h:38:7: note: ‘class tiago_webots_ros::RobotTask’ defined here 38 | class RobotTask : public rclcpp::Node { | ^~~~~~~~~ /home/user/ros2_workspace/tiago_webots_ws/src/tiago_webots_ros2/src/robot_task.cc:96:6: error: no declaration matches ‘void tiago_webots_ros::RobotTask::updateGPS(geometry_msgs::msg::PointStamped_ >::SharedPtr)’ 96 | void RobotTask::updateGPS(const geometry_msgs::msg::PointStamped::SharedPtr gps) { | ^~~~~~~~~ /home/user/ros2_workspace/tiago_webots_ws/src/tiago_webots_ros2/src/robot_task.cc:96:6: note: no functions named ‘void tiago_webots_ros::RobotTask::updateGPS(geometry_msgs::msg::PointStamped_ >::SharedPtr)’ In file included from /home/user/ros2_workspace/tiago_webots_ws/src/tiago_webots_ros2/src/robot_task.cc:1: /home/user/ros2_workspace/tiago_webots_ws/src/tiago_webots_ros2/include/tiago_webots_ros2/robot_task.h:38:7: note: ‘class tiago_webots_ros::RobotTask’ defined here 38 | class RobotTask : public rclcpp::Node { | ^~~~~~~~~ /home/user/ros2_workspace/tiago_webots_ws/src/tiago_webots_ros2/src/robot_task.cc: In member function ‘void tiago_webots_ros::RobotTask::enableDevices()’: /home/user/ros2_workspace/tiago_webots_ws/src/tiago_webots_ros2/src/robot_task.cc:105:3: error: ‘enableGPS’ was not declared in this scope 105 | enableGPS(); | ^~~~~~~~~ make[2]: *** [CMakeFiles/tiago_webots_ros2.dir/build.make:63: CMakeFiles/tiago_webots_ros2.dir/src/robot_task.cc.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:107: CMakeFiles/tiago_webots_ros2.dir/all] Error 2 make: *** [Makefile:141: all] Error 2 ```
I build with
colcon build --symlink-installI've resolved the compilation problem as in this commit. Next, I've rebuilt the workspace and launched:
ros2 launch tiago_webots_ros2 tiago.launch.pyRobot spawns correctly as Webots view seems to be OK, but in Rviz2 costmaps flash once (see below) and disappear.
I can make it appear again if I re-enable the Global Planner and Controller visualization tabs in Rviz2. I noticed that local costmap (similarly to global costmap) uses static_map layer (see screen below).
- Global Costmap's color scheme:
costmap, alpha0.5, - Local Costmap's color scheme:
raw, alpha0.7
Then, if I try to send a navigation goal, I see this kind of output in the console:
[rviz2-15] Start navigation
[bt_navigator-12] [INFO] [1626124138.768281506] [bt_navigator]: Begin navigating from current location to (0.97, 0.22)
[controller_server-9] [INFO] [1626124138.830222617] [controller_server]: Received a goal, begin computing control effort.
[ERROR] [controller_server-9]: process has died [pid 205580, exit code -11, cmd '/opt/ros/foxy/lib/nav2_controller/controller_server --ros-args -r __node:=controller_server --params-file /home/user/ros2_workspace/tiago_webots_ws/install/tiago_webots_ros2/share/tiago_webots_ros2/config/controller_server_params.yaml'].
[bt_navigator-12] [ERROR] [1626124139.890623033] [bt_navigator]: Action server failed while executing action callback: "send_goal failed"
[bt_navigator-12] [WARN] [1626124139.890667783] [bt_navigator]: [navigate_to_pose] [ActionServer] Aborting handle.
[rviz2-15] [INFO] [1626124152.032647716] [rviz2]: Trying to create a map of size 1984 x 1984 using 1 swatchesI wonder:
- why local costmap uses
static_maplayer? - what causes navigation to always fail?
Did you encounter similar problems?
As you might see, I've restructurized your package and I was able to navigate robot with a global costmap. The problem is that I cannot make local costmap working despite proper publishing of LaserScans and TransformFrames. I've tried to launch Turtlebot's navigation with parameters that you've developed and it works OK. I've checked topic names and frame IDs multiple times. I've even changed laser scanner model to RobotisLds01, but no luck - always only global costmap works.

