GuiRitter / OpenBase

An omnidirectional mobile platform with a 3 omnidirectional wheels layout
MIT License
142 stars 45 forks source link

Regarding odometry and teleop #16

Closed rolling-brawler closed 4 years ago

rolling-brawler commented 4 years ago

Sorry i am quite new in ros and gazebo. My questions are: 1.I know there is a odometry.cpp file but when i do "rostopic list" there is no "odometry" published, instead i check the cpp file, i saw there is few lines which brings to "pose/mobile" and "pose/world". Is it the same? 2.For the topic, "pose/mobile" and "pose/world", i try to echo it but what i received was:

WARNING: no messages received and simulated time is active. Is /clock being published?

Is it anything i did wrong?

  1. There is an option to control the robot using another file namely "teleop_keyboard_omni3". I successfully controlled the robot using it, but there is an issue. The robot doesn't move normally. The be detail, when i pressed the control key, one of the (u, i, o, j, k, l, m, , ,.), there is a delay. If i press the key which allows the robot to rotate, not all the wheels rotate simultaneously. Is there anything i can do? Thank you.
GuiRitter commented 4 years ago

Hi there.

Sorry i am quite new in ros and gazebo.

No problem!

1.I know there is a odometry.cpp file but when i do "rostopic list" there is no "odometry" published, instead i check the cpp file, i saw there is few lines which brings to "pose/mobile" and "pose/world". Is it the same?

This is not a ROS/Gazebo thing. This is how I decided to implement this project. The idea is for the odometry node to read data from other sources, compute the robot's position and publish it to pose/mobile (the robot's pose relative to its coordinate frame) and pose/world (the robot's pose relative to the world's coordinate frame).

You need to decide which odometry strategy you'll use. You can read from the wheel velocities and apply kinematics to use dead reckoning, or you can read from an IMU sensor, or you can read from a camera pointing to a textured floor, or you can use GPS, etc.

I tried with dead reckoning at first by reading the wheel velocities that are provided by the sensor/wheel_velocity topic but it didn't work too well. Since this is not the focus of this project I decided to "cheat" and read from /gazebo/link_states, which outright tells the robot's pose. You can see in velocity controller.launch that I pass a parameter to odometry called pose_cheat that turns this on. Of course this only works in simulation.

When you decide which odometry strategy you want to use, you'll have to edit odometry.cpp to implement this strategy. I think that when I develop this project further I will remove the odometry node and let users implement their own in their own packages. All they will need to do will be to publish to the same pose/* topics, and they will be able to read from sensor/wheel_velocity just the same.

2.For the topic, "pose/mobile" and "pose/world", i try to echo it but what i received was:

WARNING: no messages received and simulated time is active. Is /clock being published?

Is it anything i did wrong?

pose/mobile is not being published to when pose_cheat is enabled. This I still need to fix.

However, if you also can't echo pose/world, something else may be wrong. Check to see if you didn't also get the warning message Controller Spawner couldn't find the expected controller_manager ROS interface.. If you did, you can fix it by installing the packages listed by apt-cache search ros-<distro>-, where <distro> is the ROS distro you're using, such as indigo, jade, kinetic, lunar, melodic, etc.

If you didn't get this warning, paste here the terminal output after you launch the project.

  1. There is an option to control the robot using another file namely "teleop_keyboard_omni3". I successfully controlled the robot using it, but there is an issue. The robot doesn't move normally. The be detail, when i pressed the control key, one of the (u, i, o, j, k, l, m, , ,.), there is a delay. If i press the key which allows the robot to rotate, not all the wheels rotate simultaneously. Is there anything i can do?

This you'll have to see with the author of teleop_keyboard_omni3, which is YugAjmera.


I hope I've been able to satisfy your doubts and I'll keep this issue open to see about that pose/world.

Thanks for taking an interest in my project!

rolling-brawler commented 4 years ago

Hi, Gui Ritter, Sorry to get back to you after so long. Hope you stay safe and healthy. The answer provided helped me. Thanks a lot.