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

Pi Robot's profile - activity

2023-01-09 16:43:34 -0500 received badge  Great Answer (source)
2023-01-09 16:43:34 -0500 received badge  Guru (source)
2022-12-23 17:47:58 -0500 received badge  Good Answer (source)
2022-04-28 14:46:08 -0500 received badge  Great Question (source)
2021-11-12 18:04:27 -0500 marked best answer Groovy Python node cannot find move_base_msgs module

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

2021-10-19 16:12:30 -0500 received badge  Notable Question (source)
2021-10-19 16:12:30 -0500 received badge  Popular Question (source)
2021-09-01 11:52:45 -0500 received badge  Nice Answer (source)
2021-04-09 06:27:32 -0500 received badge  Nice Question (source)
2021-02-08 12:53:44 -0500 received badge  Nice Question (source)
2020-12-17 20:10:29 -0500 received badge  Famous Question (source)
2020-11-01 21:49:58 -0500 marked best answer Filtering spikes from range data

Hello,

Is it possible to use the filters package to remove spikes from real-time range data returned from sonar or IR sensors? I have a small robot running ROS that uses a number of sonar and IR sensors to detect obstacles. Every once in awhile the sensors will return a spurious value that can cause the robot to think there is an obstacle when there isn't. I don't want to use a mean filter because this slows down the robot's response to an obstacle that really is there. I just want to remove the spikes.

I can easily code this myself but I was wondering if the existing ROS filters can be used for the task?

Thanks!
patrick

2020-09-16 06:01:22 -0500 received badge  Good Question (source)
2020-06-25 06:00:36 -0500 marked best answer catkin package cannot find own message type (python)

Hello,

I have a package called skeleton_markers that I am in the process of converting from rosbuild to catkin. The package builds fine and I remembered to do a 'source devel/setup.bash' after compiling. But when I try to run a Python node (in the same package) that imports a message type defined in my package, I get the error:

Traceback (most recent call last):
  File "/home/patrick/catkin_ws/src/skeleton_markers/nodes/skeleton_markers.py", line 24, in <module>
    from skeleton_markers.msg import Skeleton
  File "/home/patrick/Dropbox/Robotics/catkin_ws/src/skeleton_markers/nodes/skeleton_markers.py", line 24, in <module>
    from skeleton_markers.msg import Skeleton
ImportError: No module named msg

When I run rosmsg on the message type, I get back the correct response:

$ rosmsg show skeleton_markers/Skeleton std_msgs/Header header
  uint32 seq
  time stamp
  string frame_id
int32 user_id
string[] name
float32[] confidence
geometry_msgs/Vector3[] position
  float64 x
  float64 y
  float64 z
geometry_msgs/Quaternion[] orientation
  float64 x
  float64 y
  float64 z
  float64 w

So I'm guessing I'm missing a key ingredient that allows a Python node to import my message type. Here are my package.xml and CMakeLists.txt files. The Python node I am trying to run is skeleton_markers.py.

My package.xml file:

<package>
  <name>skeleton_markers</name>
  <version>0.4.0</version>
  <description>
   Skeleton Markers: Publish a list of joint markers 
   for viewing in RViz.
  </description>

  <maintainer <a href="mailto:email="patrick@pirobot.org">Patrick">email="patrick@pirobot.org">Patrick</a> Goebel</maintainer>
  <license>BSD</license>
  <url type="website">http://ros.org/wiki/skeleton_markers</url>
  <url type="https://github.com/pirobot/skeleton_markers/issues"></url>
  <author <a href="mailto:email="patrick@pirobot.org">Patrick">email="patrick@pirobot.org">Patrick</a> Goebel</author>

  <buildtool_depend>catkin</buildtool_depend>

  <build_depend>libopenni-dev</build_depend>
  <build_depend>libopenni-nite-dev</build_depend>
  <build_depend>libopenni-sensor-primesense-dev</build_depend>
  <build_depend>geometry_msgs</build_depend>
  <build_depend>tf</build_depend>
  <build_depend>orocos_kdl</build_depend>
  <build_depend>message_generation</build_depend>
  <build_depend>visualization_msgs</build_depend>
  <build_depend>std_msgs</build_depend>
  <build_depend>geometry_msgs</build_depend>
  <build_depend>openni_camera</build_depend>
  <build_depend>openni_tracker</build_depend>
  <build_depend>rospy</build_depend>
  <build_depend>roscpp</build_depend>

  <run_depend>libopenni-dev</run_depend>
  <run_depend>libopenni-nite-dev</run_depend>
  <run_depend>libopenni-sensor-primesense-dev</run_depend>
  <run_depend>geometry_msgs</run_depend>
  <run_depend>orocos_kdl</run_depend>
  <run_depend>message_runtime</run_depend>
  <run_depend>visualization_msgs</run_depend>
  <run_depend>std_msgs</run_depend>
  <run_depend>geometry_msgs</run_depend>
  <run_depend>tf</run_depend>
  <run_depend>openni_camera</run_depend>
  <run_depend>openni_tracker</run_depend>
  <run_depend>rospy</run_depend>
  <run_depend>roscpp</run_depend>

</package>

My CMakeLists.txt file:

cmake_minimum_required(VERSION 2.8.3)
project(skeleton_markers)

find_package(orocos_kdl REQUIRED)
find_package(catkin REQUIRED COMPONENTS
  roscpp
  rospy
  tf
  geometry_msgs
  message_generation)

# Find OpenNI
find_package(PkgConfig)
pkg_check_modules(OpenNI REQUIRED libopenni)

# Find Nite
find_path(Nite_INCLUDEDIR
          NAMES XnVNite.h
          HINTS /usr/include/nite /usr/local/include/nite)
find_library(Nite_LIBRARY
             NAMES XnVNite_1_3_1
             HINTS /usr/lib /usr/local/lib
             PATH_SUFFIXES lib) 

link_directories(
  ${catkin_LIBRARY_DIRS}
  ${Boost_LIBRARY_DIRS}
  ${orocos_kdl_LIBRARY_DIRS}
  ${OpenNI_LIBRARIES}
  ${Nite_LIBRARY}
)

include_directories(${catkin_INCLUDEDIR}
                    ${OpenNI_INCLUDEDIR}
                    ${Nite_INCLUDEDIR}
                    ${orocos_kdl_INCLUDE_DIRS})

set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)

set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)

add_message_files (
  FILES
  Skeleton.msg
)

generate_messages(
  DEPENDENCIES geometry_msgs std_msgs
)

catkin_package(
    DEPENDS rospy roscpp visualization_msgs std_msgs geometry_msgs
    openni_camera openni_tracker tf
    CATKIN-DEPENDS message_runtime
    INCLUDE_DIRS # TODO
    LIBRARIES # TODO
)

add_executable(skeleton_tracker
  src/skeleton_tracker.cpp
  src/KinectController.cpp
  src/KinectDisplay.cpp)

target_link_libraries(skeleton_tracker
  glut
  ${catkin_LIBRARIES}
  ${OpenNI_LIBRARIES}
  ${Nite_LIBRARY}
  ${orocos_kdl_LIBRARIES})

install(TARGETS skeleton_tracker RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})

Thanks!
patrick

UPDATE ... (more)

2020-06-22 10:30:38 -0500 received badge  Nice Question (source)
2020-04-24 11:35:48 -0500 received badge  Famous Question (source)
2020-04-10 06:07:20 -0500 received badge  Good Question (source)
2020-03-22 08:46:03 -0500 marked best answer Why so much spinning in place with move_base?

Hello,

I'm trying to tune move_base under fairly ideal circumstances so I did not think it would be this hard. I am using the arbotix_python base controller in "fake" mode which basically just moves the simulated robot exactly as it's told on /cmd_vel. So I am treating it as an "ideal" test case with no physics.

I then have a Python script that moves a simulated TurtleBot to the four corners of a 1 meter square on a blank map using the simple move_base action server.

I've run through the Navigation Tuning Guide and spent many hours of trial and error tweaking the various parameters using dynamic_reconfigure but I still can't figure out why the robot has such a tendency to spin in place before it gets to a goal even when there are no obstacles and I have the recovery and clearing behaviors disabled. The problem gets worse as I make the goal tolerances smaller--for example, setting the xy_goal_tolerance to 0.05 tends to guarantee spinning and often timing out before getting to the goal.

I'm wondering if others have figured out any secrets behind this spinning behavior. I'm also wondering if not having any real or simulated observation sources could be causing it?

I get the same results whether I use the latest Electric or Fuerte debian install under Ubuntu 11.10.

EDIT 1:

My navigation config files can be found here.

And the script that moves the robot in a square can be found here.

Thanks!
patrick

2020-03-08 10:17:59 -0500 marked best answer How to check xacro syntax like check_urdf?

Hello!

I would like to do a command line syntax check of an Xacro robot model similar to the one used for non-xacro files which is:

$ rosrun urdf check_urdf model.urdf

I know I can generate a temporary URDF file from my Xacro file using:

$ rosrun xacro xacro.py model.urdf.xacro > tmp.urdf

and then run 'rosrun urdf check_urdf' on that file. But for some reason I can't figure out how to simply pipe the two commands together into one command. Can it be done?

Thanks! patrick

2019-11-24 14:52:17 -0500 marked best answer Kobuki 12V 1.5A connector?

According to this page describing the Kobuki power connectors, the 12V 1.5A connector is similar to Molex PN : 5566-02B2. The connector on the robot is single-row 1-circuit but all I can find is a two-row version. Is it possible there is a different Molex part number that matches?

Thanks!
patrick