Skip to content

Instantly share code, notes, and snippets.

View mhkabir's full-sized avatar

Kabir Mohammed mhkabir

  • Corvus Robotics
  • Mountain View, CA
  • 19:08 (UTC -07:00)
View GitHub Profile
/****************************************************************************
*
* Copyright (c) 2018 Mohammed Kabir. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
/****************************************************************************
*
* Copyright (c) 2018 Mohammed Kabir. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
Client Time Observed Time Offset
2934291937000 1498305353253442521
2934391497000 1498305353251307546
2934491486000 1498305353253317704
2934590278000 1498305353251669183
2934694011000 1498305353249381713
2934791658000 1498305353248762862
2934891550000 1498305353251713287
2934991879000 1498305353251376072
2935092486000 1498305353247311663
@mhkabir
mhkabir / gist:1c548e571155a85bdf17e8c3755bf62b
Last active June 24, 2017 18:00
Regression based timesync
//Linear Fit
#include<iostream>
#include<iomanip>
#include<cmath>
using namespace std;
int main()
{
int i,j,k,n;
cout<<"\nEnter the no. of data pairs to be entered:\n";
cin>>n;
Warning [parser.cc:778] XML Element[robotNamespace], child of element[sensor] not defined in SDF. Ignoring[robotNamespace]. You may have an incorrect SDF file, or an sdformat version that doesn't support this element.
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[Wrn] [gazebo_lidar_plugin.cpp:96] [gazebo_lidar_plugin] Please specify a robotNamespace.
[Wrn] [RaySensor.cc:359] ranges not constructed yet (zero sized)
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[INFO] [1487005540.771210, 0.148000]: Spawn status: SpawnModel: Successfully spawned model
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[ INFO] [1487005540.799034569, 0.148000000]: Physics dynamic reconfigure ready.
[Thread 0x7fffabfff700 (LWP 8387) exited]
[Wrn] [gazebo_lidar_plugin.cpp:96] [gazebo_lidar_plugin] Please specify a robotNamespace.
Thread 1 "gzserver" received signal SIGSEGV, Segmentation fault.
0x00007fff78c92a97 in boost::detail::atomic_exchange_and_add(int*, int) ()
from /home/kabir/catkin_ws/devel/lib/libgazebo_lidar_plugin.so
(gdb) bt
#0 0x00007fff78c92a97 in boost::detail::atomic_exchange_and_add(int*, int) ()
from /home/kabir/catkin_ws/devel/lib/libgazebo_lidar_plugin.so
#1 0x00007fff78c92c07 in boost::detail::sp_counted_base::release() ()
from /home/kabir/catkin_ws/devel/lib/libgazebo_lidar_plugin.so
#2 0x00007fff78c92cf1 in boost::detail::shared_count::~shared_count() ()
from /home/kabir/catkin_ws/devel/lib/libgazebo_lidar_plugin.so
@mhkabir
mhkabir / dmesg_bebop2
Created February 11, 2017 10:32
Bebop2 dump
[ 0.000000] Booting Linux on physical CPU 0
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 3.4.11+ (jenkins@971fbc5a51ae) (gcc version 4.6.3 (Sourcery CodeBench Lite 2012.03-57) ) #1 SMP PREEMPT Tue Nov 22 12:27:08 CET 2016
[ 0.000000] CPU: ARMv7 Processor [412fc097] revision 7 (ARMv7), cr=10c53c7d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine: Milos board
[ 0.000000] P7 per device DMA memory regions:
[ 0.000000] 9ff00000:9fffffff: ramoops.0
[ 0.000000] 9fe00000:9fefffff: cast-nand.0
[ 0.000000] 9fd00000:9fdfffff: ci_hdrc.0
#!/bin/sh
# default rcS running mode script
ulogger -t "rcS_mode_default" -p I "Launching PX4"
echo $((1024*1024)) > /proc/sys/net/core/wmem_max # increase the max socket size
px4 -d /home/root/px4.config > /home/root/px4.log
sleep 1