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

kinect_guy's profile - activity

2018-05-22 02:12:39 -0500 received badge  Nice Question (source)
2017-11-08 05:26:29 -0500 received badge  Student (source)
2015-06-03 11:00:25 -0500 received badge  Famous Question (source)
2015-05-06 23:06:11 -0500 received badge  Autobiographer
2015-05-06 22:29:25 -0500 commented answer Using turtlebot_create drivers with Roomba 500 series

Yes I did. I am using the 560.

2015-05-06 22:29:25 -0500 received badge  Commentator
2015-05-06 10:30:46 -0500 received badge  Famous Question (source)
2015-04-21 10:41:54 -0500 received badge  Notable Question (source)
2015-04-10 03:22:04 -0500 received badge  Notable Question (source)
2015-04-09 09:43:20 -0500 answered a question Using turtlebot_create drivers with Roomba 500 series

All of the information I was referencing is outdated. The TurtleBot stack now fully supports the Roomba 500 series; the proper variables just need to be exported.

2015-04-09 09:38:18 -0500 answered a question Unable to publish sensor_msgs/IMU message properly

After messing around with the buffer parameters for a while, I was not able to publish an IMU message directly from the Arduino.

An alternative solution is to publish the data with a different message type, then subscribe to it from the computer. In the same node a publisher can be set up which transmits an IMU message.

2015-04-09 09:25:31 -0500 received badge  Popular Question (source)
2015-04-07 11:54:29 -0500 received badge  Popular Question (source)
2015-04-06 11:25:46 -0500 asked a question Unable to publish sensor_msgs/IMU message properly

I am using rosserial to transmit gyroscope values into ROS. I am initializing the message using the format I found here. At first I got an error saying the buffer was too small, so I changed the ATMEGA328P field in ros.h from "25, 25, 280, 280" to "5, 5, 512, 512".

This worked, but then I started getting errors like:

[INFO] [WallTime: 1428333648.941214] wrong checksum for topic id and msg
[WARN] [WallTime: 1428333651.605690] Serial Port read returned short (expected 1 bytes, received 0 instead).
[WARN] [WallTime: 1428333651.608523] Serial Port read failure: 
[WARN] [WallTime: 1428333651.626828] Serial Port read returned short (expected 8 bytes, received 1 instead).
[WARN] [WallTime: 1428333651.629609] Serial Port read failure: 
[INFO] [WallTime: 1428333651.633695] Packet Failed :  Failed to read msg data
[INFO] [WallTime: 1428333651.636200] msg len is 8
[INFO] [WallTime: 1428333651.646104] wrong checksum for topic id and msg
[INFO] [WallTime: 1428333653.732366] wrong checksum for topic id and msg
[WARN] [WallTime: 1428333657.162546] Serial Port read returned short (expected 8 bytes, received 5 instead).

From google searches, the only possible explanation I could find was to change the baud rate, however I must not have implemented it correctly as it this resulted in the error (yes, its supposed to be ttyUSB1):

[INFO] [WallTime: 1428335580.534810] Connecting to /dev/ttyUSB1 at 115200 baud
[ERROR] [WallTime: 1428335598.989444] Lost sync with device, restarting...

I am unsure of what to try next. Any suggestions are appreciated.

Here is my code:

#define pi 3.14159265359

#include <ros.h>
#include <sensor_msgs/Imu.h>

ros::NodeHandle nh;

sensor_msgs::Imu imu_msg;

ros::Publisher gyro("/imu/data", &imu_msg);

int gyroPin = 0;               //Gyro is connected to analog pin 0
float gyroVoltage = 5;         //Gyro is running at 5V
float gyroZeroVoltage = 2.5;   //Gyro is zeroed at 2.5V
float gyroSensitivity = .0125;  //Our example gyro is 12.5mV/deg/sec
float rotationThreshold = 1;   //Minimum deg/sec to keep track of - helps with gyro drifting

float currentAngle = 0;          //Keep track of our current angle


void setup()
{
  //nh.getHardware()->setBaud(115200); //or what ever baud you want
  nh.initNode();
  nh.advertise(gyro);
  imu_msg.header.frame_id = 0;
  imu_msg.orientation.x = 0.0;
  imu_msg.orientation.y = 0.0;
  imu_msg.orientation.z = 0.0;
  imu_msg.orientation.w = 0.0;
}

void loop()
{
  //This line converts the 0-1023 signal to 0-5V
  float gyroRate = (analogRead(gyroPin) * gyroVoltage) / 1023;

  //This line finds the voltage offset from sitting still
  gyroRate -= gyroZeroVoltage;

  //This line divides the voltage we found by the gyro's sensitivity
  gyroRate /= gyroSensitivity;

  //Ignore the gyro if our angular velocity does not meet our threshold
  if (gyroRate >= rotationThreshold || gyroRate <= -rotationThreshold) {
    //This line divides the value by 100 since we are running in a 10ms loop (1000ms/10ms)
    gyroRate /= 100;
    currentAngle += gyroRate;
  }

  //Keep our angle between 0-359 degrees
  if (currentAngle < 0)
    currentAngle += 360;
  else if (currentAngle > 359)
    currentAngle -= 360;

  currentAngle = currentAngle * (pi/180);  //convert degrees/s to radians/s

  imu_msg.orientation.z = currentAngle;

  imu_msg.header.stamp = nh.now();
  gyro.publish( &imu_msg );
  nh.spinOnce();
  delay(1000);
}
2015-04-04 06:43:16 -0500 received badge  Famous Question (source)
2015-02-02 20:45:22 -0500 received badge  Famous Question (source)
2014-11-23 02:59:53 -0500 received badge  Notable Question (source)
2014-11-23 02:59:13 -0500 received badge  Popular Question (source)
2014-10-26 21:15:00 -0500 asked a question Using turtlebot_create drivers with Roomba 500 series

I am attempting my first implementation of SLAM and am trying to decide on a platform. Since I live outside of the US the Create is not available to me.

I saw in this thread that it was possible to patch the create drivers from the turtlebot for use with the 500 series. Unfortunately the links they provide are dead.

Would performing the patch myself be too ambitious for an amateur?

The other option is to use these drivers, which I would need to port from Fuerte to Hydro.

Can someone provide a scale of difficulty for either of these tasks? I am reading this thread which makes the latter option seem reasonable. I just feel there may be circumstances I am unprepared for. I have a timeline of about three months so I would like to have an idea before spending $300.

Thanks

2014-10-21 12:42:15 -0500 answered a question Libfreenect won't install properly on 12.04 Hydro

The issue is the model of the Kinect itself. Version 1473 is currently experiencing issues with the freenect library. Furthur discussion here: https://github.com/ros-drivers/freenect_stack/issues/12

2014-10-21 12:38:25 -0500 received badge  Famous Question (source)
2014-10-20 20:07:42 -0500 commented answer Libfreenect won't install properly on 12.04 Hydro

Thanks for your help during this process. I re-installed ROS Hydro and am having the same issues. I will update the thread if I find a solution.

2014-10-20 19:11:36 -0500 commented answer Libfreenect won't install properly on 12.04 Hydro

When I run glview it is still unable to open the device. Freenect_launch will not work either.

2014-10-20 18:42:10 -0500 commented answer Libfreenect won't install properly on 12.04 Hydro

Yes it is. From the link you provided I ran

$ sudo usermod -a -G video alex

Where alex is the user. I did the same command replacing video with audio.

2014-10-20 17:48:12 -0500 commented answer Libfreenect won't install properly on 12.04 Hydro

Output:

total 0
crw-rw-r-- 1 root root  189, 0 Oct 20 19:00 001
crw-rw-r-- 1 root root  189, 1 Oct 20 19:00 002
crw-rw-r-- 1 root root  189, 4 Oct 20 19:00 005
crw-rw-rw- 1 root audio 189, 5 Oct 20 19:00 006
crw-rw-rw- 1 root video 189, 6 Oct 20 19:00 007
2014-10-20 17:22:42 -0500 received badge  Notable Question (source)
2014-10-20 17:12:23 -0500 received badge  Notable Question (source)
2014-10-20 17:06:02 -0500 commented answer Libfreenect won't install properly on 12.04 Hydro

This does not work either. glview still cannot open the device. I tried restarting, ensured the proper kernel is blacklisted and the normal user directory was correct. Any other ideas are appreciated.

Is there a way to manually change the kinect to index = 1 like freenect_launch is looking for?

2014-10-20 16:08:16 -0500 commented answer Libfreenect won't install properly on 12.04 Hydro

The above directory looks like (for the USB device):

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:21:2f:30:79:c4", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"

PS if it wasn't clear I did try your suggestion.

2014-10-20 16:04:20 -0500 commented answer Libfreenect won't install properly on 12.04 Hydro

Your tip has led me to try some other methods, none of which have worked. I tried

sudo chmod o+w /dev/bus/usb/001/010 /001/010 being the bus and device of XBox NUI Camera.

I also tried nano /etc/udev/rules.d/70-persistent-net.rules as replacing "SYSFS" with "ATTR" should help.

2014-10-20 14:41:13 -0500 commented answer Libfreenect won't install properly on 12.04 Hydro

Yes, that does work. It outputs

Kinect camera test
Number of devices found: 1
Could not open device

Do you have any tips why it is unable to open the device?

See my first example as well

2014-10-20 14:38:18 -0500 received badge  Popular Question (source)
2014-10-19 17:33:06 -0500 asked a question Libfreenect won't install properly on 12.04 Hydro

I am trying to use libfreenect with a kinect. The output when I run

roslaunch freenect_launch freenect-xyz.launch

is

[ INFO] [1413756004.829132537]: Number devices connected: 1
[ INFO] [1413756004.829250239]: 1. device on bus 000:00 is a Xbox NUI Camera (2ae) from Microsoft (45e) with serial id '0000000000000000'
[ INFO] [1413756004.831311636]: Searching for device with index = 1
[ INFO] [1413756004.843299915]: No matching device found.... waiting for devices. Reason: [ERROR] Unable to open specified kinect

The next command I ran was

rosrun libfreenect glview.

This returned

[rosrun] Couldn't find executable named glview below /opt/ros/hydro/share/libfreenect

So I tried

alex@alex-OptiPlex-GX620:~$ rospack find libfreenect
/opt/ros/hydro/share/libfreenect
alex@alex-OptiPlex-GX620:~$ cd /
alex@alex-OptiPlex-GX620:/$ cd /opt/ros/hydro/share/libfreenect
alex@alex-OptiPlex-GX620:/opt/ros/hydro/share/libfreenect$ ls
package.xml

From my understanding this means the proper packages that should come with libfreenect have not been installed. I have tried re-installing with no success. I have run

sudo apt-get update
sudo apt-get dist-upgrade

I have made sure to run

sudo modprobe -r gspca_kinect
echo 'blacklist gspca_kinect' | sudo tee -a /etc/modprobe.d/blacklist.conf

The kinect is being connected by USB 2.0. The result of lsusb is

Bus 001 Device 002: ID 045e:02c2 Microsoft Corp. 
Bus 001 Device 005: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN
Bus 002 Device 002: ID 046d:c018 Logitech, Inc. Optical Wheel Mouse
Bus 003 Device 002: ID 413c:2105 Dell Computer Corp. Model L100 Keyboard
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 007: ID 045e:02ad Microsoft Corp. Xbox NUI Audio
Bus 001 Device 008: ID 045e:02ae Microsoft Corp. Xbox NUI Camera
2014-10-15 14:23:45 -0500 marked best answer rosrun will not execute despite successful build

After a successful catkin_make, I made sure to source devel/setup.bash inside the catkin workspace and ran roscore. The output of echo "$ROS_PACKAGE_PATH" is "/home/alex/kinect_bench/src:/opt/ros/hydro/share:/opt/ros/hydro/stacks".

I get his warning from catkin_make:

In file included from /usr/include/c++/4.6/backward/strstream:52:0,
             from /usr/include/vtk-5.8/vtkIOStream.h:112,
             from /usr/include/vtk-5.8/vtkSystemIncludes.h:40,
             from /usr/include/vtk-5.8/vtkIndent.h:24,
             from /usr/include/vtk-5.8/vtkObjectBase.h:43,
             from /usr/include/vtk-5.8/vtkSmartPointerBase.h:26,
             from /usr/include/vtk-5.8/vtkSmartPointer.h:23,
             from /usr/include/pcl-1.7/pcl/visualization/point_cloud_geometry_handlers.h:48,
             from /usr/include/pcl-1.7/pcl/visualization/point_cloud_handlers.h:41,
             from /usr/include/pcl-1.7/pcl/visualization/common/actor_map.h:40,
             from /usr/include/pcl-1.7/pcl/visualization/pcl_visualizer.h:47,
             from /usr/include/pcl-1.7/pcl/visualization/cloud_viewer.h:39,
             from /home/alex/kinect_bench/src/grabber/src/openni_grabber.cpp:2:

/usr/include/c++/4.6/backward/backward_warning.h:33:2: warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated. [-Wcpp]

also, when I run roswtf the output is:

Loaded plugin tf.tfwtf No package or stack in context
================================================================================ Static checks summary:

Found 1 error(s).

ERROR Not all paths in PYTHONPATH [/home/alex/kinect_bench/devel/lib/python2.7/dist-packages:/opt/ros/hydro/lib/python2.7/dist-packages] point to a directory:   * /home/alex/kinect_bench/devel/lib/python2.7/dist-packages

================================================================================ Beginning tests of your ROS graph. These may take awhile... analyzing graph... ... done analyzing graph running graph rules... ... done running graph rules

Online checks summary:

Found 1 warning(s). Warnings are things that may be just fine, but are sometimes at fault

WARNING The following node subscriptions are unconnected:  * /rosout:    * /rosout

my CMakeLists:

cmake_minimum_required(VERSION 2.8.3)
project(grabber)

find_package(catkin REQUIRED COMPONENTS
  pcl_conversions
  pcl_msgs
  pcl_ros
  roscpp
  sensor_msgs
  std_msgs
)

find_package(Boost REQUIRED COMPONENTS system)

catkin_package(
  INCLUDE_DIRS include
  LIBRARIES grabber
  CATKIN_DEPENDS pcl_conversions pcl_msgs pcl_ros roscpp sensor_msgs std_msgs
  DEPENDS system_lib
)

include_directories(
  ${catkin_INCLUDE_DIRS}
  ${PCL_LIBRARY_DIRS}
  ${PCL_INCLUDE_DIRS}
)

#add_library(grabber
#  src/${PROJECT_NAME}/grabber.cpp
#)

# target_link_libraries(grabber_node
#   ${catkin_LIBRARIES}
# )

link_directories(${PCL_LIBRARY_DIRS})

add_definitions(${PCL_DEFINITIONS})

add_executable (grabber src/openni_grabber.cpp)
target_link_libraries (grabber ${PCL_LIBRARIES} ${catkin_LIBRARIES})

my package.xml;

<?xml version="1.0"?>
<package>
  <name>grabber</name>
  <version>0.0.0</version>
  <description>The grabber package</description>
  <maintainer email="alex@todo.todo">alex</maintainer>
  <license>TODO</license>
  <buildtool_depend>catkin</buildtool_depend>
  <build_depend>pcl_conversions</build_depend>
  <build_depend>pcl_msgs</build_depend>
  <build_depend>pcl_ros</build_depend>
  <build_depend>roscpp</build_depend>
  <build_depend>sensor_msgs</build_depend>
  <build_depend>std_msgs</build_depend>
  <run_depend>pcl_conversions</run_depend>
  <run_depend>pcl_msgs</run_depend>
  <run_depend>pcl_ros</run_depend>
  <run_depend>roscpp</run_depend>
  <run_depend>sensor_msgs</run_depend>
  <run_depend>std_msgs</run_depend>
 </package>

Thanks for any help

2014-10-15 14:23:45 -0500 received badge  Supporter (source)
2014-10-15 14:23:41 -0500 received badge  Scholar (source)
2014-10-15 14:09:56 -0500 received badge  Enthusiast