renan028 / tiago_webots_ros2 Goto Github PK
View Code? Open in Web Editor NEWTiago robot (Pal Robotics) integration with ROS2 and Navigation2
Tiago robot (Pal Robotics) integration with ROS2 and Navigation2
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:
```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.
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).
costmap
, alpha 0.5
,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:
static_map
layer?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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.