Cannot import custom rosmsg (actionlib)
Hi,
I have very strange problem related to my custom action msg. I compiled my msg, but I can't import it. When I try to run my py action server I am getting next error:
raceback (most recent call last):
File "/home/ivan/infocom_robotics_ws/src/dock_station_goal/src/turn_for_specific_angle_server.py", line 5, in <module> from dock_station_goal.msg import DoTurnAction, DoTurnFeedback, DoTurnResult ImportError: No module named msg
But I can at the same time I can find my msg with: rosmsg list | grep DoTurn
ivan@ivan-desktop:~$ rosmsg list | grep DoTurn
dock_station_goal/DoTurnAction dock_station_goal/DoTurnActionFeedback dock_station_goal/DoTurnActionGoal dock_station_goal/DoTurnActionResult dock_station_goal/DoTurnFeedback dock_station_goal/DoTurnGoal dock_station_goal/DoTurnResult ivan@ivan-desktop:~$
Another strange thing is that when I am checking: rosmsg packages, the pkgs with my custom msgs are doubled:
ivan@ivan-desktop:~$ rosmsg packages
actionlib actionlib_msgs actionlib_tutorials base_local_planner beginner_tutorials beginner_tutorials bond control_msgs costmap_2d diagnostic_msgs dock_station_goal dock_station_goal dynamic_reconfigure geometry_msgs map_msgs move_base_msgs nav_msgs realsense2_camera robot_drive roscpp rosgraph_msgs rospy_tutorials rosserial_msgs sensor_msgs shape_msgs smach_msgs std_msgs stereo_msgs tf tf2_msgs trajectory_msgs turtle_actionlib turtlebot3_msgs turtlebot_msgs turtlesim visualization_msgs
You can see that beginner_tutorials and dock_station_goal are doubled
I am stack and getting crazy((( Can somebody help me?
Thank you!
EDIT
I am using catkin_make, the output of $ROS_PACKAGE_PATH is:
/home/ivan/infocom_robotics_ws/src:/opt/ros/melodic/share
And my Cmake list is:
cmake_minimum_required(VERSION 2.8.3) project(dock_station_goal)
find_package(catkin REQUIRED COMPONENTS message_generation
actionlib actionlib_msgs
move_base_msgs roscpp rospy
std_msgs genmsg )add_action_files( DIRECTORY action FILES DoDocking.action
DoTurn.action )generate_messages( DEPENDENCIES
std_msgs actionlib_msgs )catkin_package( LIBRARIES dock_station_goal CATKIN_DEPENDS move_base_msgs roscpp rospy std_msgs actionlib_msgs DEPENDS system_lib
DEPENDS message_runtime )include_directories(
${catkin_INCLUDE_DIRS} )${catkin_EXPORTED_TARGETS})
${catkin_EXPORTED_TARGETS})
Another weird thing is that I can import my msg from /home/usr/my_ws by running python! But I cant import from my_pkg/src
Could you please edit your post and provide the following information:
CMakeLists.txt
of your package (remove all comments, though),catkin_make
orcatkin_tools / catkin build
)echo $ROS_PACKAGE_PATH
@mgruhler I edited my post
Unfortunately I don't have this project on a github