Skip to content

Instantly share code, notes, and snippets.

Avatar

Shubham Maddhashiya sipah00

View GitHub Profile
View vcabm.txt
(order, t) = (3, 7.898646981472869)
(errm2, errm1, errp1) = (0.0066714465394643345, 7.06413721038784e-10, 1.2156273602575786e-5)
(order, t) = (3, 7.898648125152829)
(errm2, errm1, errp1) = (0.6671411861345267, 7.064027444712867e-7, 4.431278245404084e-8)
(order, t) = (3, 7.898659561952434)
(errm2, errm1, errp1) = (66.71065078138368, 0.0007063256623599753, 3.0691013381677468e-6)
(order, t) = (3, 7.898773929948488)
View CMakeLists.txt
cmake_minimum_required(VERSION 2.8.3)
project(talker_listener)
## Find catkin and any catkin packages
find_package(catkin REQUIRED COMPONENTS roscpp rospy std_msgs genmsg)
## Generate added messages and services
generate_messages(DEPENDENCIES std_msgs)
## Declare a catkin package
View listener.cpp
#include "ros/ros.h"
#include "std_msgs/String.h"
void chatterCallback(const std_msgs::String::ConstPtr& msg){
ROS_INFO("I heard: [%s]", msg->data.c_str());
}
int main(int argc, char **argv){
ros::init(argc, argv, "listener");
ros::NodeHandle n;
ros::Subscriber sub = n.subscribe("chatter", 1000, chatterCallback);
ros::spin();
View talker.cpp
#include "ros/ros.h"
#include "std_msgs/String.h"
#include <sstream>
int main(int argc, char **argv){
ros::init(argc, argv, “talker”);
ros::NodeHandle n;
ros::Publisher chatter_pub = n.advertise<std_msgs::String>(“chatter”, 1000);
ros::Rate loop_rate(10);
int count = 0;
while (ros::ok()){
View Configuration.bash
mkdir src
cd src
catkin_init_workspace
cd ..
catkin_make
echo "source $(pwd)/devel/setup.bash" >> ~/.bashrc
source ~/.bashrc
View Dependencies.bash
sudo apt-get install python-rosinstall python-rosinstall-generator python-wstool build-essential
View zshset.bash
echo "source /opt/ros/kinetic/setup.zsh" >> ~/.zshrc
source ~/.zshrc
View source.bash
source /opt/ros/kinetic/setup.bash
@sipah00
sipah00 / en.bash
Last active Aug 16, 2017
env setup
View en.bash
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
source ~/.bashrc
View dep.bash
sudo rosdep init
rosdep update
You can’t perform that action at this time.