0

I'm trying to setup a ROS navigation stack on gazebo simulated pepper robot. For my local planner I'm using dwa planner. Here is my yaml file for local planner.

When I give my stack a nav goal via rviz, no matter what goal I gave to robot, he simply starts rotating in place like in this video. Thanks!

bornaZbodulja
  • 37
  • 4
  • 9
  • So I think I found the source of the issue. When I'm publishing the velocity commands manually to cmd_vel topic and when I publish the linear x velocity to be 0.2 robot rotates in place and when I publish angular z velocity to be 0.5 robot is moving linearly. Does anybody know how to flip those two around? Thank – bornaZbodulja May 01 '20 at 10:38
  • That's a weird issue. Which node is listening to cmd_vel and moving the robot? – Dominic D May 04 '20 at 09:52
  • I fixed that by updating my pepper_gazebo_plugin but something is still weird with the robot. When I'm in rviz robot simply moves randomly between two positions, but I'm not even giving it any Nav goal or moving it in simulator. I'll try to record a short video to demonstrate the issue. – bornaZbodulja May 06 '20 at 06:07
  • Here is the [link](https://www.dropbox.com/s/jpqpr2wxgpi3dts/Screencast%20from%2006.05.2020%2008%3A34%3A14.webm?dl=0) to the video. – bornaZbodulja May 06 '20 at 06:38
  • It looks like you have two competing nodes publishing tf frames for Pepper, and Rviz is just jumping randomly between the two. The localiser from your navigation stack should be publishing the map -> odom tf. And Pepper's odometry integration should be publishing odom -> base_link. Perhaps you have two competing odometry frames being published? – Dominic D May 06 '20 at 08:51
  • Yep, I was launching map to odom transformation manualy so that fixed that issue, but now when I give robot a nav goal, robot is moving in gazebo but in rviz robot model stays in the initial position. I also echoed the amcl_pose topic and it is not updating. – bornaZbodulja May 06 '20 at 09:07
  • Do have you a node integrating odom from the robot? That node should also publish a tf from `odom` to `base_link` – Dominic D May 06 '20 at 09:14
  • Yes, in my launch file I have transformation from odom to base_footprint and from base_footprint to base_link – bornaZbodulja May 06 '20 at 09:36
  • Do you mean you define a static transform in your launch file? The odom -> base footprint tf needs to be updated as the robot moves around the world. Usually you have a node publishing `/odom` for the mapping, which will also publish the updated tf from odom -> base footprint – Dominic D May 06 '20 at 09:41
  • Yes that must be the source of the issue. I defined a static transformation from odom to base_footprint and amcl needs to update that transformation. – bornaZbodulja May 06 '20 at 09:44
  • But the reason why I defined the static transformation between odom and base_footprint is that they are not connected in tf_tree. – bornaZbodulja May 06 '20 at 09:48
  • Note: from the AMCL [docs](https://wiki.ros.org/amcl) - it won't publish the transform from odom -> base_footprint, it will publish the transform from map -> odom (it's probably already doing this). You should be getting odometry information from the robot in a `nav_msgs/Odometry` topic? This is the pose of the robot in the odom frame (ie. odom -> base_footprint). You need to publish that as a tf. – Dominic D May 06 '20 at 09:49
  • Yes I'm getting the info from odom topic and it says that the frame id is pepper_robot/odom but when I run tf_echo on that frame it says that frame pepper_robot/odom does not exist – bornaZbodulja May 06 '20 at 09:54
  • Yes. You need to make a new node that subscribes to the `pepper_robot/odom` topic and publishes the odom as a tf. There's a tutorial on writing a TF broadcaster node [here](https://wiki.ros.org/tf/Tutorials/Writing%20a%20tf%20broadcaster%20%28Python%29) – Dominic D May 06 '20 at 10:01
  • Okay thanks, I'll look into it. – bornaZbodulja May 06 '20 at 10:05

1 Answers1

0

So i looked at my odom topic and everything seems to be alright. Here is my odom topic. In topic the frame of the odometry is pepper_robot/odom and child frame pepper_robot/base_link but when I look in my tf_tree I'cant see odometry frame. Here is my tf_tree. And I checked my odometry information is in form of nav_msgs/Odometry.

bornaZbodulja
  • 37
  • 4
  • 9