Ask Your Question

How to move my robot

asked 2020-10-14 15:22:34 -0500

Manulobo gravatar image

Hello to all,

I am using rtabmap and kinect 360. I also have a Ylidar. Everything works perfectly and I am seeing it in rviz.

My doubt is how to make ROS move my robot based on the obstacles that are in the map. I have a TB6612FNG engine, I have everything connected, but I don't understand how to make it move. How do I tell ROS where the engine pins are so that it can move it automatically?

I'm using ROS Melodic.

Thank you very much.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2020-10-17 20:12:20 -0500

matlabbe gravatar image

For rtabmap_ros integration with move_base, see

For an example with Turtlebot3 on melodic in simulation, see

To setup move_base's costmaps and planners, see

edit flag offensive delete link more

answered 2020-10-15 02:45:02 -0500


to get the obstacles in MoveIt (octomap) from rtabmap, you have to write a script that subscribes to the rtabmap-octomap

rospy.Subscriber('octomap_binary', Octomap, your_callback, queue_size=1)

and publish this into move_group/monitored_planning_scene

rospy.Publisher('move_group/monitored_planning_scene', PlanningScene, queue_size=1)

Full script:

#! /usr/bin/env python

import rospy
from octomap_msgs.msg import Octomap
from moveit_msgs.msg import PlanningScene, PlanningSceneWorld, CollisionObject

frame_id = 'map'
pub_octo = rospy.Publisher('move_group/monitored_planning_scene', PlanningScene, queue_size=10)
pub2 = rospy.Publisher('/planning_scene', PlanningScene, queue_size=10)
psw = PlanningSceneWorld()
psw.octomap.header.stamp =
psw.octomap.header.frame_id = frame_id
psw.octomap.origin.position.x = 0
psw.octomap.origin.orientation.w = 1
ps = PlanningScene()

def cb(msg):
    col_obj = CollisionObject()
    col_obj.header.frame_id = frame_id

    psw.octomap.octomap = msg = psw
    ps.is_diff = True

if __name__ == '__main__':
    print("Starte die Uebertragung von Rtabmap-Octomap in die Pfadplanung")
    rospy.Subscriber('octomap_binary', Octomap, cb, queue_size=1)  # octomap_full

This works for me but there is probably a more elegant way.


edit flag offensive delete link more


Are you confusing move_group and move_base perhaps?

gvdhoorn gravatar image gvdhoorn  ( 2020-10-15 03:05:40 -0500 )edit

When you look here (MoveIt System Architecture) you see that move_group is getting the planning_scene from the Occupancy Map

RobertZickler gravatar image RobertZickler  ( 2020-10-15 03:28:12 -0500 )edit

The OP has base_move as a tag, which I believe should have been move_base. That's from the navigation stack.

rtabmap is often also used with navigation, as are lidars.

TB6612FNG is a "dual motor driver carrier", probably used to drive motors for a differential drive platform.

That was what I was asking: move_group is MoveIt, move_base is Navigation stack.

gvdhoorn gravatar image gvdhoorn  ( 2020-10-15 03:33:19 -0500 )edit

My apology, you are absolutely right. My answer is therfore unnecessary. I completely missunderstood the question.

RobertZickler gravatar image RobertZickler  ( 2020-10-15 03:46:15 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2020-10-14 15:22:34 -0500

Seen: 225 times

Last updated: Oct 17 '20