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

mmedvede's profile - activity

2016-07-20 02:26:18 -0500 received badge  Good Answer (source)
2014-05-02 01:15:43 -0500 received badge  Necromancer (source)
2013-11-21 04:46:09 -0500 answered a question Oculus Rift rviz plugin - "No Oculus evice found"

I just had a similar problem while using ros-hydro-oculus-sdk 0.2.3 with oculus-rviz-plugin. The oculus was not detected and failed to work with rviz. The problem was the wrong resolution of the secondary display (OVR) I accidentally set. As soon as I set the resolution back to 1280x800, everything started working. So if you have a similar problem, make sure the resolution is correct. It cost me 3 hours.

I think it should be considered a bug of linux OculusSDK. OculusSDK 0.2.5 still fails to detect the HMD if resolution is not what it expects. I am running Ubuntu 12.04

2013-08-04 14:02:05 -0500 received badge  Nice Answer (source)
2013-07-08 18:52:49 -0500 received badge  Necromancer (source)
2013-05-22 08:46:39 -0500 answered a question Extract robot position from rosbag

I know it would not really answer your question about whether your approach is correct. I am not familiar with rosbag API.

What I know should work is playing back the bag file and having a node with tf::TransformListener do the work of calculating your pose. Your node could look similar to this.

2013-05-22 08:05:35 -0500 answered a question QR Code detection?

There are some packages that do QR or generic barcode detection, but they are usually part of a stack and thus hard to use on their own. It would be nice to have a generic package for barcode detection.

The package I know of is cob_marker, which is part of cob_object_perception stack. It does require RGB-d sensor such as Kinect.

I have also written my own package for the task I had, namely simulating the Player's laser barcode driver. It only uses camera and estimates the barcode location based on a preset barcode size (not very precise). zbar_barcode_reader

2013-04-14 23:22:54 -0500 received badge  Famous Question (source)
2013-02-07 06:14:56 -0500 received badge  Notable Question (source)
2013-01-23 05:46:21 -0500 commented answer Updating RViz display without clock being published (use_sim_time is true)

My tf tree does not have any parts missing and is fully connected at all times. In any case, what I want seems to bee too convoluted to implement with RViz right now. Thank you

2013-01-23 05:16:16 -0500 received badge  Popular Question (source)
2013-01-23 05:13:54 -0500 commented answer Updating RViz display without clock being published (use_sim_time is true)

No, rosbag would resume after the pause. This is a problem if my own clock ran ahead of the rosbag's. The thing is, even publishing my own clock does not make RViz to redraw. I wander if RViz needs the full tf tree with the newer stamps along with the new clock to redraw.

2013-01-23 05:02:06 -0500 commented answer Updating RViz display without clock being published (use_sim_time is true)

I did try to publish my own time to /clock. It was slightly incremented compared to the one that rosbag published. The rosbag /clock has been remapped to /clock2, as it keeps publishing the clock even when playback is on hold.

2013-01-23 04:45:58 -0500 commented answer Updating RViz display without clock being published (use_sim_time is true)

Thank you for the answer. I should have specified I use wallTimer callback, and I do not use wall time to stamp any of the messages I send out when the bag playback is on pause.

2013-01-22 05:29:51 -0500 asked a question Updating RViz display without clock being published (use_sim_time is true)

I am playing back a bag file and need to be able to move things around while the bag is on pause. I have an interactive marker that broadcasts its pose as a transform. I also have a laser scan in the frame of the marker's transform frame. RViz does update transform tree display and interactive marker, but the laser scan only moved to the new location when I resume the bag playback.

The laser scan is published by a node (not by the rosbag) based on wallclock. To force the RViz to update the scan I tried to change laser scan time stamp. I tried to publish to /clock myself, incrementing the timestamp while the bag is on pause (I remapped the rosbag's /clock). Nothing did work.

Edit: The laser scan I want to move in the rviz display is published with ros::wallTimer callback (frequency does not depend on simulation clock). It is stamped based on the last /clock message from the bag. I was hoping to figure out how to get the laser scan to be redrawn at the correct location according to updated tf tree, without resuming the bag playback.

The goal is to be able to get some measurements done on the recorded data using convenience of RViz infrastructure.

2012-12-24 02:01:43 -0500 received badge  Nice Answer (source)
2012-12-09 17:11:39 -0500 answered a question How to filter tfs in a bag file

Try

rosbag filter source.bag filtered.bag 'topic!="\tf" or m.transforms[0].child_frame_id != "odom"

child_frame_id is not in a header. This should fix the error you get.

2012-11-15 03:07:25 -0500 received badge  Enlightened (source)
2012-11-08 07:19:02 -0500 received badge  Good Answer (source)
2012-11-08 06:27:39 -0500 received badge  Nice Answer (source)
2012-11-08 04:58:31 -0500 answered a question ROS errors while exchanging messages with Stage

Change

geometry_msgs::Pose robot_pose = mes.pose;

to

geometry_msgs::Pose robot_pose = mes.pose.pose;

Check the definition of nav_msg/Odometry carefully - mes.pose is PoseWithCovariance.

2012-09-13 04:26:36 -0500 received badge  Necromancer (source)
2012-09-12 10:24:41 -0500 answered a question rflex/b21 cmd_vel not working as expected

I confirm that michikarg's fix does work.

I was also able to fix the issue 'in code' by gently ripping out the port initialization function from original player's rflex driver, and adding it to ROS rflex_driver.cc. I did not clean the code and now my driver has two redundant initializations.

To save you some time, here is the code I have added (rflex-player.hh):

/*
 * Functions ripped straight from player's rflex driver to fix the issue
 * with port initialization.
 */

#ifndef RFLEX_PLAYER_HH_
#define RFLEX_PLAYER_HH_

#include <rflex/rflex_info.h>
#include <fcntl.h>
#include <termios.h>

#define MAX_NAME_LENGTH                256

enum PARITY_TYPE   { N, E, O };

typedef struct {
  char                       ttyport[MAX_NAME_LENGTH];
  int                        baud;
  enum PARITY_TYPE           parity;
  int                        fd;
  int                        databits;
  int                        stopbits;
  int                        hwf;
  int                        swf;
} RFLEX_Device;

// From rflex-io.cc
int iParity(enum PARITY_TYPE par) {
    if (par == N)
        return (IGNPAR);
    else
        return (INPCK);
}

int iSoftControl(int flowcontrol) {
    if (flowcontrol)
        return (IXON);
    else
        return (IXOFF);
}

int cDataSize(int numbits) {
    switch (numbits) {
    case 5:
        return (CS5);
        break;
    case 6:
        return (CS6);
        break;
    case 7:
        return (CS7);
        break;
    case 8:
        return (CS8);
        break;
    default:
        return (CS8);
        break;
    }
}

int cStopSize(int numbits) {
    if (numbits == 2) {
        return (CSTOPB);
    } else {
        return (0);
    }
}

int cFlowControl(int flowcontrol) {
    if (flowcontrol) {
        return (CRTSCTS);
    } else {
        return (CLOCAL);
    }
}

int cParity(enum PARITY_TYPE par) {
    if (par != N) {
        if (par == O) {
            return (PARENB | PARODD);
        } else {
            return (PARENB);
        }
    } else {
        return (0);
    }
}

int cBaudrate(int baudrate) {
    switch (baudrate) {
    case 0:
        return (B0);
        break;
    case 300:
        return (B300);
        break;
    case 600:
        return (B600);
        break;
    case 1200:
        return (B1200);
        break;
    case 2400:
        return (B2400);
        break;
    case 4800:
        return (B4800);
        break;
    case 9600:
        return (B9600);
        break;
    case 19200:
        return (B19200);
        break;
    case 38400:
        return (B38400);
        break;
    case 57600:
        return (B57600);
        break;
    case 115200:
        return (B115200);
        break;
#ifdef B230400
    case 230400:
        return (B230400);
        break;
#endif

    default:
        return (B9600);
        break;
    }

}

void DEVICE_set_params(RFLEX_Device dev) {
    struct termios ctio;

    tcgetattr(dev.fd, &ctio); /* save current port settings */

    ctio.c_iflag = iSoftControl(dev.swf) | iParity(dev.parity);
    ctio.c_oflag = 0;
    ctio.c_cflag = CREAD | cFlowControl(dev.hwf || dev.swf)
            | cParity(dev.parity) | cDataSize(dev.databits)
            | cStopSize(dev.stopbits);

    ctio.c_lflag = 0;
    ctio.c_cc[VTIME] = 0; /* inter-character timer unused */
    ctio.c_cc[VMIN] = 0; /* blocking read until 0 chars received */

    cfsetispeed(&ctio, (speed_t) cBaudrate(dev.baud));
    cfsetospeed(&ctio, (speed_t) cBaudrate(dev.baud));

    tcflush(dev.fd, TCIFLUSH);
    tcsetattr(dev.fd, TCSANOW, &ctio);

}

int DEVICE_connect_port(RFLEX_Device *dev) {
    if ((dev->fd = open((dev->ttyport), (O_RDWR | O_NOCTTY), 0)) < 0) {
        return (-1);
    }
    DEVICE_set_params(*dev);
    return (dev->fd);
}
// /rflex-io.h

int rflex_open_connection(const char *device_name, int *fd) {
    RFLEX_Device rdev;

    strncpy(rdev.ttyport, device_name, MAX_NAME_LENGTH);
    rdev.baud = 115200;
    rdev.databits = 8;
    rdev.parity = N;
    rdev.stopbits = 1;
    rdev.hwf = 0;
    rdev.swf = 0;

    printf("trying port %s\n", rdev.ttyport);
    if (DEVICE_connect_port(&rdev) < 0) {
        fprintf(stderr, "Can't open device %s\n", rdev.ttyport);
        return -1;
    }

    *fd = rdev.fd;
    return 0;
}

#endif /* RFLEX_PLAYER_HH_ */

Then include the above into rflex_driver.cc and replace (in rflex_driver.cc):

fd = open(device_name, O_RDWR | O_NONBLOCK);
if (fd == -1) {

for

if (rflex_open_connection(device_name, &fd) < 0) {

If someone wants to go through the ... (more)

2012-09-12 08:33:23 -0500 received badge  Popular Question (source)
2012-09-12 08:33:23 -0500 received badge  Notable Question (source)
2012-09-12 08:33:23 -0500 received badge  Famous Question (source)
2012-07-12 08:16:50 -0500 received badge  Supporter (source)
2012-06-07 05:29:00 -0500 received badge  Student (source)
2012-06-06 10:33:42 -0500 received badge  Teacher (source)
2012-06-06 10:33:42 -0500 received badge  Necromancer (source)
2012-06-06 10:33:42 -0500 received badge  Self-Learner (source)
2012-06-06 07:54:58 -0500 answered a question An up to date version of the rflex / b21 stack

Updated rflex driver package that includes atrvjr node is here: http://www.cs.uml.edu/~mmedvede/files/rflex.tar.gz The only tested capability is motor control. Sonars and other features have not been tested for atrvjr. The package has some patches from the repository I have referenced in the question.

2012-06-06 05:45:20 -0500 commented question An up to date version of the rflex / b21 stack

David, merging following changes would improve the rflex driver and b21 node:
http://code.in.tum.de/indefero/index.php//p/rwib21/source/commit/a0c9fb6d90bc6cda9d1f0b8af046c0872fff5cb9/
http://code.in.tum.de/indefero/index.php//p/rwib21/source/commit/1f3c001df573698a7abec9a25b08df4ff6de9328/

2012-02-11 09:39:01 -0500 received badge  Editor (source)
2012-02-11 09:36:00 -0500 asked a question An up to date version of the rflex / b21 stack

This is not a question. I have spent some time today fixing the issues of the atrvjr_node I have based on the b21_node (http://www.ros.org/wiki/rflex). The issue was with the wrong odometry output. And then I found that there is a newer version of the stack with some fixes. The newer stack can be cloned: git clone http://code.in.tum.de/git/rwib21.git