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

Elizaveta.Elagina's profile - activity

2016-04-23 05:52:12 -0500 received badge  Famous Question (source)
2015-12-03 19:50:11 -0500 received badge  Famous Question (source)
2015-07-10 01:28:13 -0500 received badge  Famous Question (source)
2015-07-01 10:22:12 -0500 received badge  Famous Question (source)
2015-05-07 15:48:35 -0500 received badge  Notable Question (source)
2015-04-22 14:12:18 -0500 received badge  Notable Question (source)
2015-04-22 14:12:18 -0500 received badge  Popular Question (source)
2015-04-03 18:48:51 -0500 received badge  Popular Question (source)
2015-03-06 03:14:46 -0500 received badge  Notable Question (source)
2015-03-06 03:14:43 -0500 received badge  Enthusiast
2015-03-05 04:51:09 -0500 answered a question Kobuki unpredictability

The problem was that the function ImuCallback doesn't accept new parameters as ordinary functions. And if it's called more than once, it sometimes works with old parameters instead of newly received. To solve this I give the angle as a global variable not as a parameter for a callback function.

2015-03-05 04:47:07 -0500 answered a question Turtlebot ride backwards a specified distance

I see that class TravelForward can be used for my purpose. Probably it's not the most straightforward way but it works.

2015-03-04 09:20:07 -0500 asked a question Turtlebot ride backwards a specified distance

I want to write a python script that makes Turtlebot ride backwards for a specified distance in meters. I have this function

def ImuCallback(data, angle):


 global stage
  quat = data.orientation
  q = [quat.x, quat.y, quat.z, quat.w]
  roll, pitch, yaw = euler_from_quaternion(q)

  sys.stdout.write("\r\033[1mGyro Angle\033[0m: [" + "{0:+.4f}".format(yaw) + " rad]  ["\
                 + "{0: >+7.2f}".format(degrees(yaw)) + " deg]"\
                 + "            \033[1mRate\033[0m: [" + "{0:+.4f}".format(data.angular_velocity.z) + " rad/s]  ["\
                 + "{0: >+7.2f}".format(degrees(data.angular_velocity.z)) + " deg/s] ")
  if angle > 0:
    if yaw > angle or yaw < 0:
      stage += 1
  else:
    if yaw > angle and yaw < 0:
      stage += 1

which makes it stop when the robot is rotating. I would like to read the distance travelled by the robot similarly as to how I read the angle of its rotation. I feel it has to be simple but I don't know how to do it. Thanks in advance!

2015-03-04 09:14:05 -0500 commented question No devices connected

Thnak you, I will try this.

2015-03-02 06:54:13 -0500 received badge  Popular Question (source)
2015-03-02 04:03:58 -0500 commented question No devices connected

Do you mean that I should change slam_gmapping_pr2.launch in gmapping package? Sorry, I'm a novice in this. How do I start freenect_launch in the launch file?

2015-02-27 06:30:28 -0500 commented question No devices connected

freenect_launch works and I can get image from the camera, so that's great, thank you, Jarvis. But I would like to use kinect for building a map and I was hoping to use gmapping. When I run roslaunch turtlebot_navigation gmapping_demo.launch I get the same error about no devices connected.

2015-02-26 01:30:57 -0500 received badge  Famous Question (source)
2015-02-23 05:43:05 -0500 commented question Kobuki unpredictability

Thank you for the advice about rospy.init_node, but the problem seems to be something else. Are the bumpers only actuated when they're pressed? Apparently, they have nothing to do with my problem.

2015-02-23 04:14:20 -0500 received badge  Commentator
2015-02-23 03:58:58 -0500 asked a question Kobuki unpredictability

I've been trying to run python scripts on Kobuki Turtlebot in order to make it perform specific patterns on the floor. I've noticed that while executing the same script on the same spot, it provides radically different performances. This is an example of my script:

#!/usr/bin/env python

# for robot A

import rospy
from kobuki_testsuite import TravelForward 
from std_msgs.msg import Empty
from geometry_msgs.msg import Twist
from std_msgs.msg import Empty
import roslib; roslib.load_manifest('kobuki_testsuite')
import sys
import copy
import os
import subprocess

from tf.transformations import euler_from_quaternion
from math import degrees

from sensor_msgs.msg import Imu
from geometry_msgs.msg import Quaternion

global stage
stage = 1
global length
length = 1 # length in metres
global width
width = 1 
#des = 0.5  # desired angle in radians - it's negative if angle is larger than 3.14

def resetter():
    try:
        pub = rospy.Publisher('/mobile_base/commands/reset_odometry', Empty, queue_size=10)
        rospy.init_node('resetter', anonymous=True)
        rate = rospy.Rate(10) # 10hz
        for i in range(0,10):
          pub.publish(Empty())
          rate.sleep()
    except rospy.ROSInterruptException:
        pass

def ImuCallback(data, angle):
  global stage
  quat = data.orientation
  q = [quat.x, quat.y, quat.z, quat.w]
  roll, pitch, yaw = euler_from_quaternion(q)

  sys.stdout.write("\r\033[1mGyro Angle\033[0m: [" + "{0:+.4f}".format(yaw) + " rad]  ["\
                 + "{0: >+7.2f}".format(degrees(yaw)) + " deg]"\
                 + "            \033[1mRate\033[0m: [" + "{0:+.4f}".format(data.angular_velocity.z) + " rad/s]  ["\
                 + "{0: >+7.2f}".format(degrees(data.angular_velocity.z)) + " deg/s] ")
  if angle > 0:
    if yaw > angle or yaw < 0:
      stage += 1
  else:
    if yaw > angle and yaw < 0:
      stage += 1 

def publish(pub, v, sec, step):
    cnt = 0
    m = sec * 2

    while cnt < m and not rospy.is_shutdown() and stage == step: 
        pub.publish(v)
        cnt = cnt + 1
        rospy.sleep(0.5)

def rotation_anticlockwise(step, angle, r):
    rospy.Subscriber("/mobile_base/sensors/imu_data", Imu, ImuCallback, angle)
    cmdvel_topic ='/cmd_vel_mux/input/teleop'

    pub = rospy.Publisher(cmdvel_topic, Twist)
    vel = Twist() 
    print "rotation"
    print stage
    while not rospy.is_shutdown() and stage == step:
      vel.angular.z = 0.5
      vel.linear.x = 0.5 * r
      rospy.loginfo("Anticlockwise")
      publish(pub, vel, 18, step)  
      rospy.loginfo("Done")
      rospy.sleep(2)
  #    if stage == 0:
   #     vel.angular.z = 0
  #  rospy.sleep(2)

if __name__ == '__main__':
    global stage
    resetter()
    rotation_anticlockwise(1, 1.57, 0)
    resetter()
    print stage
    stage = 2
    rotation_anticlockwise(2, -0.02, 0.2 * length)

What I meant for it to do is to rotate to 90 degrees and then make a full circle with a specified radius. Most of the times I run the script I get it to rotate a bit and then stand still or rotate and then make just a part of a circle. What troubles me is I don't understand whether the problem is my script or some mechanics inside the robot. Could it be that its bumper sensors are too sensitive and make it stop unexpectedly? If so, is there a way around?

2015-02-23 03:48:16 -0500 commented answer Set different speed on Turtlebot wheels

Thank you, I will try doing that!

2015-02-23 03:47:58 -0500 received badge  Scholar (source)
2015-02-18 07:23:58 -0500 received badge  Notable Question (source)
2015-02-15 13:16:53 -0500 received badge  Popular Question (source)
2015-02-15 06:31:47 -0500 asked a question Set different speed on Turtlebot wheels

How do I set different speed for Turtlebot wheels using python? I've been using Twist() for making the Turtlebot move forward or rotate on one spot. How do I use angular and linear for setting speed on on wheels separately? For instance, I want Turtlebot to go in a circle with a specific radius.

2015-02-13 07:57:09 -0500 commented answer How to make the Turtlebot rotate in place a set # of degrees/radians

Thank you! I will try that.

2015-02-13 07:11:59 -0500 asked a question Reset Turtlebot odometry in a Python script

I am using rostopic pub /mobile_base/commands/reset_odometry std_msgs/Empty to reset odometry on Turtlebot. It works fine but I want to do the same thing in a Python script. Here is my code:

import rospy
from std_msgs.msg import Empty

rospy.init_node('reset_odom')

pub = rospy.Publisher('/mobile_base/commands/reset_odometry', Empty, queue_size=10)
pub.publish(Empty())

It doesn't work. Could you point out what is wrong with it? Thanks!

2015-02-12 09:24:27 -0500 commented answer How to make the Turtlebot rotate in place a set # of degrees/radians

Maybe I didn't get your advice right, but how do I fixate the moment it reached the desired heading given that I set only the velocity?

2015-02-12 09:23:49 -0500 commented answer How to make the Turtlebot rotate in place a set # of degrees/radians

I have the same question. I wonder if it's possible to send the desired radian/degree as a parameter to the programme? So that when I run the script it automatically rotates a desired degree.

2015-02-12 07:27:55 -0500 received badge  Notable Question (source)
2015-02-12 07:11:10 -0500 received badge  Editor (source)
2015-02-12 03:25:27 -0500 commented question No devices connected

I guess I have installed it from apt-get. If this is the problem, how do I change my sources setup? Thanks in advance!

2015-02-11 11:38:39 -0500 received badge  Student (source)
2015-02-11 08:14:17 -0500 received badge  Popular Question (source)
2015-02-10 08:13:00 -0500 asked a question No devices connected

Hello! I'm trying to connect my laptop to Kinect. After running roslaunch openni_launch openni.launch I get the following message: No devices connected.... waiting for devices to be connected. I know this question has been asked many times, but I've tried all of the advice I found here and am running out of ideas. When I run killall XnSensorServer I get no such process found and when I run XnSensorServer I get XnSensorServer: error while loading shared libraries: libOpenNI.so: wrong ELF class: ELFCLASS64. Could this be the issue? How can I fix it?

Best regards, Elizaveta

UPD

turtle@turtle-brain:~$ apt-cache policy libopenni0
libopenni0:
  Установлен: 1.5.4.0-7
  Кандидат:   1.5.4.0-7
  Таблица версий:
 *** 1.5.4.0-7 0
        500 http://ru.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
        100 /var/lib/dpkg/status
turtle@turtle-brain:~$ ldd /usr/lib/libopenni-sensor-primesense0/XnSensorServer
    linux-vdso.so.1 =>  (0x00007fff519eb000)
    libOpenNI.so.0 => /usr/lib/libOpenNI.so.0 (0x00007fde9cba8000)
    libXnFormats.so.0 => /usr/lib/libXnFormats.so.0 (0x00007fde9c981000)
    libXnDDK.so.0 => /usr/lib/libXnDDK.so.0 (0x00007fde9c729000)
    libXnDeviceSensorV2.so.0 => /usr/lib/libXnDeviceSensorV2.so.0 (0x00007fde9c484000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fde9c0bd000)
    libusb-1.0.so.0 => /lib/x86_64-linux-gnu/libusb-1.0.so.0 (0x00007fde9bea6000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fde9bca2000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fde9ba83000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fde9b87b000)
    libtinyxml.so.2.6.2 => /usr/lib/x86_64-linux-gnu/libtinyxml.so.2.6.2 (0x00007fde9b666000)
    libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fde9b361000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fde9b05b000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fde9ae45000)
    /lib64/ld-linux-x86-64.so.2 (0x00007fde9ce51000)
    libXnCore.so.0 => /usr/lib/libXnCore.so.0 (0x00007fde9ac40000)
    libjpeg.so.8 => /usr/lib/x86_64-linux-gnu/libjpeg.so.8 (0x00007fde9a9eb000)
    libudev.so.1 => /lib/x86_64-linux-gnu/libudev.so.1 (0x00007fde9a7d9000)
    libcgmanager.so.0 => /lib/x86_64-linux-gnu/libcgmanager.so.0 (0x00007fde9a5be000)
    libnih.so.1 => /lib/x86_64-linux-gnu/libnih.so.1 (0x00007fde9a3a5000)
    libnih-dbus.so.1 => /lib/x86_64-linux-gnu/libnih-dbus.so.1 (0x00007fde9a19b000)
    libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007fde99f56000)
turtle@turtle-brain:~$ uname -a
Linux turtle-brain 3.13.0-43-generic #72-Ubuntu SMP Mon Dec 8 19:35:06 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

I am using Ubuntu 14.04 and ROS Indigo.

When I run dpkg-query --list |grep openni |awk '{print $2}' | xargs -d "\n" sudo apt-get install --reinstall -y I get the following:

turtle@turtle-brain:~$ dpkg-query --list |grep openni |awk '{print $2}' | xargs -d "\n" sudo apt-get install --reinstall -y 
Чтение списков пакетов… Готово (reading package lists - ready)
Построение дерева зависимостей (building dependency trees) Чтение информации о состоянии… Готово (reading state information -ready) Некоторые пакеты невозможно установить. (Some packages can't be installed)
Возможно, вы просите невозможного, или же используете нестабильную версию дистрибутива, где запрошенные вами пакеты ещё не созданы или были удалены из Incoming. (Maybe you request the impossible or use an unstable distributive version where the requested packages aren't installed or were deleted)
Следующая информация, возможно, поможет вам: (Following information might ...
(more)
2015-02-10 08:12:59 -0500 answered a question "No Device Connected, Waiting for Device to be Connected" Error when Connecting Kinect with Ubuntu on a Virtual Box.

Hello! I have the same issue. I've tried all of the advice given above and am running out of ideas. Like the author when I run killall XnSensorServer I get no such process found and when I run XnSensorServer I get XnSensorServer: error while loading shared libraries: libOpenNI.so: wrong ELF class: ELFCLASS64. Could this be the issue? How can I fix it?

Best regards, Elizaveta