This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <launch> | |
| <node pkg="tf" type="static_transform_publisher" name="baselink2camera" args="0 0 1.2 0 0 0 1 base_link camera_link 100" /> | |
| <node pkg="tf" type="static_transform_publisher" name="baselink2gripper" args="0.5 0 0.6 0 0 0 1 base_link gripper 100" /> | |
| <node pkg="rostopic" type="rostopic" name="apple_detector" args="pub /camera/detector/apple geometry_msgs/PointStamped "{header: | |
| {seq: 0, | |
| stamp: { | |
| secs: 0, | |
| nsecs: 0}, | |
| frame_id: 'camera_link'}, | |
| point:{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #define MAX_CAPACITY 10000 | |
| #define MIN_BUFFER 1000 | |
| #define MAX_LINE 10 | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <stdbool.h> | |
| #include <string.h> | |
| long getRandomNumber(long max) { | |
| return random()%max; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class MockFile: | |
| def __init__(self): | |
| self.data = [] | |
| self.position = 0 | |
| def seek(self, offset, type=0): | |
| if type == SEEK_END: | |
| self.position = len(self.data) - offset | |
| else: | |
| self.position = offset |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| std_msgs/Header header | |
| std_msgs/String source_id | |
| std_msgs/String message |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # This is the most important shell utility... remember to place it in your PATH | |
| # chmod +x mamama | |
| echo "Ototototo" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import rospy | |
| from sensor_msgs.msg import * | |
| from cv_bridge import CvBridge | |
| import cv2 | |
| import numpy as np | |
| bridge = CvBridge() | |
| rospy.init_node("Redmasker") | |
| image_pub = rospy.Publisher("RedMasked",Image) | |
| def img_handler(msg): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def conjugation(self, vector): | |
| """Conjugation of vector by self. | |
| @param self unit quaternion. | |
| @param vector 3-vector, aka pure quaternion. | |
| @return pure quaternion of result: self *vector*self. | |
| """ | |
| self.x,self.y,self.z = self.v | |
| Q = np.array([[self.w, -self.z, self.y, self.x], | |
| [ self.z, self.w, -self.x, self.y], | |
| [-self.y, self.x, self.w, self.z], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ------------------------------- MODULE hanoi ------------------------------- | |
| EXTENDS Integers, Sequences | |
| \* Towers of hanoi problem | |
| VARIABLES tower1, tower2, tower3 | |
| \* Initiallize the towers | |
| Init == /\ tower1 = <<3,2,1,0>> | |
| /\ tower2 = <<0>> | |
| /\ tower3 = <<0>> | |
| \* Transition rules |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <uspeech.h> | |
| signal voice(A0); | |
| char option = 0; | |
| void setup(){ | |
| voice.calibrate(); | |
| voice.f_enabled = true; | |
| Serial.begin(9600); | |
| } | |
| void loop(){ | |
| //voice.sample(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| M[16],X=16,W,k; | |
| main(){ | |
| T(system("stty cbreak")); | |
| puts(W&1?"WIN":"LOSE"); | |
| } | |
| K[]={2,3,1}; | |
| s(f,d,i,j,l,P){ | |
| for(i=4;i--;){ | |
| for(j=k=l=0;k<4;){ |