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

Trexter's profile - activity

2015-09-01 20:03:55 -0500 received badge  Student (source)
2015-09-01 20:03:44 -0500 received badge  Famous Question (source)
2015-04-16 04:50:34 -0500 received badge  Notable Question (source)
2015-04-10 02:05:36 -0500 received badge  Famous Question (source)
2015-04-07 12:52:22 -0500 commented question String message being cut off.

Okay, after a bit of testing I think that I've narrowed it down to a couple possible causes. 1) and most likely: I was transmitting 4 bytes of floats represented by characters. I think that byte 20 was a 4 in decimal or EOT(end of transmission). 2) some other ending of stream or file character.

2015-04-01 19:00:38 -0500 received badge  Notable Question (source)
2015-04-01 10:19:00 -0500 commented question String message being cut off.

@gvdhoorn Is that enough?(i edited the question)

2015-04-01 10:18:23 -0500 commented question String message being cut off.

At this point I have abandoned using string to transmit characters, instead I am using Float32MultiArray.

2015-04-01 10:12:34 -0500 received badge  Editor (source)
2015-04-01 10:09:23 -0500 commented question String message being cut off.

@BennyRe the type is std::string

2015-04-01 00:45:59 -0500 received badge  Popular Question (source)
2015-03-30 21:25:15 -0500 asked a question String message being cut off.

I've been transmitting data in a string, the string is only 24 chars long, but the last 4 chars are being cut off once published as a message. I cannot find an issue.

The string.length() value is 24. Also ROS_INFO() cuts off the last 4 chars too.

Any solutions?

Platform: Rapsberry Pi 2 Model B -- OS: Raspbian (Debian Wheezy) 3.18 -- ROS: Indigo(1.11.10)

Thanks.

void transferSerialData(){
//----- CHECK FOR ANY RX BYTES -----
if (uart0_filestream != -1)
{
    // Read up to 255 characters from the port if they are there
    unsigned char rx_buffer[256];
    int rx_length = read(uart0_filestream, (void*)rx_buffer, 255);      //Filestream, buffer to store in, number of bytes to read (max)
    if (rx_length < 0)
    {
        //An error occured (will occur if there are no bytes)
    }
    else if (rx_length == 0)
    {
        //No data waiting
    }
    else //process data
    {
        //Bytes received
        rx_buffer[rx_length] = '\0';
        //load bytes into string
        std::string temp;
        for(int i = 0; i < rx_length; i++){
            temp += rx_buffer[i];
        }
        serialDataIn = temp;
        ROS_INFO("i got: %s", rx_buffer);
        if(rx_length >= 4){
        bytesReceived = true;
        }
    }
}

then...

std_msgs::String serial_raw_msg;
    std::stringstream ss;
    ss << serialDataIn;
    serial_raw_msg.data = ss.str();
    serial_raw_pub.publish(serial_raw_msg);

receiving program:

void serialCallback(const std_msgs::String::ConstPtr& msg){
    serialDataIn = msg->data.c_str();
    std::cout << serialDataIn << "\n";
    std::cout << serialDataIn.length() << "\n";

}

this prints out only 20 of the original 24 bytes

2015-03-30 01:24:37 -0500 received badge  Famous Question (source)
2015-03-16 03:07:41 -0500 received badge  Popular Question (source)
2015-03-07 16:16:54 -0500 received badge  Supporter (source)
2015-03-07 16:08:53 -0500 asked a question Hector SLAM - Yawing issue + IMU Yaw fusion?

I am using hector slam with an RpLidar (only 5-10 hertz). It works phenomenally well in a straight line, but when I yaw just a little aggressively, hector slam gets confused and doesn't detect a yaw at all. I assume it is due to scan distortions.

(I would upload an image if i could)

My question is if it is possible to manually input a true yaw value when the change in yaw is greater than a certain value?

2015-03-07 07:50:44 -0500 received badge  Enthusiast
2015-03-06 23:42:27 -0500 received badge  Notable Question (source)
2015-03-03 16:20:18 -0500 received badge  Popular Question (source)
2015-03-02 10:27:35 -0500 asked a question Slam Raspberry Pi 2 *

The raspberry pi 2 is a much more powerful version of raspberry pi. I've installed ROS hydro on it because I had problems with ROS Indigo.

First of all its a quadcopter with a seperate microcontroller for stabilization and position hold.

I have an 2D RpLidar, down facing optical flow sensor, and a down facing sonar for altitude as well as an IMU.

I've seen many slam libraries, but only one slam example was similar to my problem.

https://www.youtube.com/watch?v=DhrCu...

I was wondering what slam library I could use for 3D slam?