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

Groovy Python node cannot find move_base_msgs module

asked 2013-03-19 06:13:22 -0500

Pi Robot gravatar image

Hello,

My setup: Latest Groovy debs on Ubuntu 12.04LTS.

I have a simple Python node in a catkin package that needs to import MoveBaseAction and MoveBaseGoal from move_base_msgs. My import line looks like this:

from move_base_msgs.msg import MoveBaseAction, MoveBaseGoal

which worked fine in Fuerte. My package.xml file includes the line:

<run_depend>move_base_msgs</run_depend>

And my Groovy debian installation has the move_base_msgs package installed:

$ rospack find move_base_msgs
/opt/ros/groovy/stacks/navigation/move_base_msgs

But when I try to run the node I get the error:

Traceback (most recent call last):
  File "/home/patrick/Dropbox/Robotics/ros/catkin_ws/src/rbx2/rbx2_tasks/nodes/nav_tasks.py", line 35, in <module>
    from move_base_msgs.msg import MoveBaseAction, MoveBaseGoal
ImportError: No module named move_base_msgs.msg

Other message imports work fine; for example, I can import the Odometry message type from nav_msgs.msg using:

from nav_msgs.msg import Odometry

with the following line in my package.xml file:

  <run_depend>nav_msgs</run_depend>

What am I doing wrong?

Thanks!
patrick

edit retag flag offensive close merge delete

Comments

Sorry I can't help. ROS by example is a great book though, just wanted to say thanks, helped a lot with my final year project:)

Tadhg Fitzgerald gravatar image Tadhg Fitzgerald  ( 2013-03-19 08:16:04 -0500 )edit

Thanks @Tadhg Fitzgerald :-)

Pi Robot gravatar image Pi Robot  ( 2013-03-19 14:04:03 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
4

answered 2013-03-19 11:03:01 -0500

fergs gravatar image

Catkin packages can only depend on catkin packages, and move_base_msgs has yet to be catkinized.

edit flag offensive delete link more

Comments

Thanks @fergs. Guess I'll wait until Hydro to do any more playing with catkin...

Pi Robot gravatar image Pi Robot  ( 2013-03-19 14:03:15 -0500 )edit

I am getting the same issue. Can you share the link for catkinized move_base_msgs.

Sj_Nath gravatar image Sj_Nath  ( 2022-10-27 03:18:32 -0500 )edit
1

answered 2013-08-17 00:36:15 -0500

RobAnswers gravatar image

You don't need to wait for the Hydro version, it's out already! You just need to get it.

Clone the github repo (git clone https://github.com/ros-planning/navigation.git) and copy the move_base_msgs folder into a catkin workspace on your ROS_PACKAGE_PATH. You can delete the rest of the repo as you don't need it. (If you need to make a catkin workspace then you can follow this tutorial)

Now you can catkin_make from the root of the workspace and Python will be able to import move_base_msgs happily.

edit flag offensive delete link more

Comments

I have tried it. Even rosmsg package my_package lists the messages. rosmsg show MoveBaseAction shows the whole info. Still It is not working.

Sj_Nath gravatar image Sj_Nath  ( 2022-10-27 03:16:06 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2013-03-19 06:13:22 -0500

Seen: 2,789 times

Last updated: Aug 17 '13