ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Accessing Turtlebot iRobot Create Sensors

asked 2012-07-02 10:23:35 -0500

Rydel gravatar image

updated 2012-07-02 12:39:43 -0500

mjcarroll gravatar image

I noticed that when navigating with the gmapping demo or amcl demo that the turtlebot stops when the wheel drop sensors or bump sensors are active, just wondering if anyone knows what node takes care of this (move_base?) and what source file it can be found in.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-07-02 12:38:47 -0500

mjcarroll gravatar image

The Turtlebot handles this in the Turtlebot Node, which forms the ROS interface to the iRobot Create hardware.

The most relevant bits are:

Line 398 and forward, where if there is a cmd_vel to be sent to the hardware, it first executes the self.check_bumpers function at Line 429.

def check_bumpers(self, s, cmd_vel):
    # Safety: disallow forward motion if bumpers or wheeldrops
    # are activated.
    # TODO: check bumps_wheeldrops flags more thoroughly, and disable
    # all motion (not just forward motion) when wheeldrops are activated
    forward = (cmd_vel[0] + cmd_vel[1]) > 0
    if self.stop_motors_on_bump and s.bumps_wheeldrops > 0 and forward:
        return (0,0)
        return cmd_vel

The actual hardware interaction is taking place in the file or the file, also in the turtlebot_node package.

edit flag offensive delete link more



thanks a lot

Rydel gravatar image Rydel  ( 2012-07-03 05:23:49 -0500 )edit

Question Tools


Asked: 2012-07-02 10:23:35 -0500

Seen: 770 times

Last updated: Jul 02 '12