UWB


Firmware (stm32)

rosserial_stm32: https://github.com/yoneken/rosserial_stm32
rosserial_arduino:http://wiki.ros.org/rosserial_arduino
BPHero UWB manual: shorturl.at/efhA7

vscode_arduino :https://swf.com.tw/?p=1231

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →


Circuit

Floor Layout

Positioning Source Code

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
uwb_bphero_to_ros

#define SOP 'm'
#define EOP '\r'

bool started = false;
bool ended = false;

uint8_t inData[20];
byte index;

void setup()
{
  Serial.begin(115200);
  Serial1.begin(115200,SERIAL_8N1);

  Serial.println("Hello");
}

void loop()
{
  // Read all serial data available, as fast as possible
  while(Serial1.available() > 0)
  {
    uint8_t inChar = Serial1.read();
    if(inChar == SOP)
    {
       Serial.print("SOP:");
       Serial.println(inChar,HEX);
       index = 0;
       inData[index] = inChar;
       started = true;
       ended = false;
       index++;
    }
    else if(inChar == EOP)
    {
       Serial.print("EOP:");
       Serial.println(inChar,HEX);
       Serial.println(index);
       inData[index] = inChar;
       ended = true;
       break;
    }
    else
    {
      if(index < 20)
      {
        inData[index] = inChar;
        index++;
      }
    }
  }

  if(started && ended)
  {
    // The end of packet marker arrived. Process the packet

    Serial.println(inData[0],HEX);
    Serial.println(inData[1],HEX);
    Serial.println(inData[2],HEX);
    Serial.println(inData[3],HEX);
    Serial.println(inData[4],HEX);
    Serial.println(inData[5],HEX);
    Serial.println(inData[6],HEX);
    Serial.println(inData[7],HEX);
    Serial.println(inData[8],HEX);
    Serial.println(inData[9],HEX);
    Serial.println(inData[10],HEX);
    Serial.println(inData[11],HEX);
    Serial.println(inData[12],HEX);
    Serial.println(inData[13],HEX);
    Serial.println(inData[14],HEX);
    Serial.println(inData[15],HEX);
    Serial.println(inData[16],HEX);
    Serial.println(inData[17],HEX);
    Serial.println(inData[18],HEX);
    Serial.println("------------");
    // Reset for the next packet
    started = false;
    ended = false;
    index = 0;
    inData[index] = '\0';
  }
}

creating customed msg
http://wiki.ros.org/ROS/Tutorials/CreatingMsgAndSrv
make libraries into Arduino
https://answers.ros.org/question/119031/rosserial_client-does-not-include-make_librarypy/

rosrun rosserial_arduino make_libraries.py ~/Arduino/libraries

tentitive test rosseral_node:

roscore
rosrun rosserial_python serial_node.py /dev/ttyACM0 _baud:=115200

rosserial_arduino array limitation:
http://wiki.ros.org/rosserial/Overview/Limitations#Arrays
http://wiki.ros.org/rosserial/Overview/Messages

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
Kalman Filter論壇

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
kalman code

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
bphero uwb源碼解析

todo:

  1. 更新hackMD上的arduino code(rosserial+pui_msg)
  2. 更新github pui-pkg
  3. Arduino Serial Plotter Multiple Graphs
  4. 先可視化三個距離的雜訊多不多
  5. kalmann filter
  6. 濾波前後比較(視化三個距離)
  7. 更改位置算法(pdf/particle filter轉至矩陣)