Skip to content

Instantly share code, notes, and snippets.

View kirubeltadesse's full-sized avatar
😃
Working on .... personal project

Kirubel Tadesse kirubeltadesse

😃
Working on .... personal project
View GitHub Profile
@kirubeltadesse
kirubeltadesse / .js
Created November 15, 2018 19:19
Data required
function callDSMalgorithm()
{
saveResult= false;
imageList = new Array();
callTime = new Date().getTime();
var vertex = saveTableValue();
var soilfunction=readcheckbox("soil function");
var terrainatrribute=readcheckbox("terrain attribute");
var clusterselect=document.getElementById("ClusterNumber");
import sys
class Vertex:
def __init__(self, node):
self.id = node
self.adjacent = {}
# Set distance to infinity for all nodes
self.distance = sys.maxint
# Mark all nodes unvisited
self.visited = False
DEVICE = atmega328p
CLOCK = 9830400
PROGRAMMER = -c usbtiny -P usb
OBJECTS = main.o
FUSES = -U hfuse:w:0xd9:m -U lfuse:w:0xe0:m
# Fuse Low Byte = 0xe0 Fuse High Byte = 0xd9 Fuse Extended Byte = 0xff
# Bit 7: CKDIV8 = 1 Bit 7: RSTDISBL = 1 Bit 7:
# 6: CKOUT = 1 6: DWEN = 1 6:
# 5: SUT1 = 1 5: SPIEN = 0 5:
// this is a ROS version of the standard "hello, swarmies"
// program
// this header defines the standard ROS classes.
#include<ros/ros.h>
int main(int argc, char **argv){
// Initialize the ROS system.
ros::init(argc, argv, "hello_swarmies");
#include <ros/ros.h>
#include <tf/transform_broadcaster.h>
char host[128];
std::string rover_name;
std::string hostname;
int main(int argc, char** argv){
gethostname(host, sizeof(host));
// assume
// the value of r will be on px value
// the value of c will be on px value
// (r,c) are the coordinate value in px on the image itself
// if you assume the image coordinate have u and v direciton r will be the value on the u axis
// and c will be the value on the v axis
// include math.h, ros.h the function of tan and arctan can be found on those header
#include <ros/ros.h>
#include <math.h>