Giter VIP home page Giter VIP logo

tiago_webots_ros2's People

Contributors

renan028 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tiago_webots_ros2's Issues

Navigation goals are not accepted - unable to navigate the robot

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-install

I've resolved the compilation problem as in this commit. Next, I've rebuilt the workspace and launched:

ros2 launch tiago_webots_ros2 tiago.launch.py

Robot spawns correctly as Webots view seems to be OK, but in Rviz2 costmaps flash once (see below) and disappear.

image

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).

image

  • Global Costmap's color scheme: costmap, alpha 0.5,
  • Local Costmap's color scheme: raw, alpha 0.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 swatches

I wonder:

  • why local costmap uses static_map layer?
  • 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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.