ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

sadeksadek's profile - activity

2021-09-07 03:41:53 -0500 received badge  Famous Question (source)
2021-09-07 03:41:53 -0500 received badge  Notable Question (source)
2021-09-07 03:41:53 -0500 received badge  Popular Question (source)
2021-05-01 01:35:14 -0500 received badge  Famous Question (source)
2021-05-01 01:35:14 -0500 received badge  Notable Question (source)
2021-02-11 14:41:12 -0500 asked a question how to detect apriltag using stereo cam

how to detect apriltag using stereo cam Iam using stereo USB cam to detect Apriltag system but i think all what i get t

2020-01-14 06:30:07 -0500 received badge  Popular Question (source)
2019-10-18 09:20:19 -0500 asked a question errors while using moveit into class

errors while using moveit into class good Day guys iam trying to use moveit classes to implement them into my class an

2019-10-15 06:14:05 -0500 received badge  Famous Question (source)
2019-10-15 05:38:10 -0500 received badge  Enthusiast
2019-10-11 06:18:58 -0500 commented answer Multiple Subscribers in one Cpp file.

you can increase the publishing rate by reducing the number ros::Publisher pub = nh.advertise<std_msgs::string>(

2019-10-09 04:24:57 -0500 commented answer callback function doesnt printout the subscribe msg

yea i am doing the tutorial again because i just need it to receive the message only once only when i call the case . bu

2019-10-08 10:36:53 -0500 commented answer callback function doesnt printout the subscribe msg

thanks for your help you really helped me to understand how it works, for the first question my supervisor wanted the

2019-10-08 10:33:52 -0500 received badge  Supporter (source)
2019-10-08 10:32:58 -0500 commented answer callback function doesnt printout the subscribe msg

thanks for your help you really helped me to understand how it works

2019-10-08 10:31:40 -0500 commented answer callback function doesnt printout the subscribe msg

it works finally thanks very much for your help though the callback function was repeated somehow when i call the 0 opti

2019-10-08 10:29:52 -0500 marked best answer callback function doesnt printout the subscribe msg

hello guys iam new at ROS and iam trying to print the msg and some how it doesnt print it and i cant find where is the problem this is my code

#include <moveit/move_group_interface/move_group_interface.h>
#include <moveit/planning_scene_interface/planning_scene_interface.h>
#include <moveit_msgs/DisplayRobotState.h>
#include <moveit_msgs/DisplayTrajectory.h>
#include <moveit_msgs/AttachedCollisionObject.h>
#include <moveit_msgs/CollisionObject.h>
#include <moveit_visual_tools/moveit_visual_tools.h>
#include <iostream>
#include <moveit/robot_model/robot_model.h>
#include <moveit/robot_state/robot_state.h>
#include <ros/ros.h>
#include "geometry_msgs/PointStamped.h"
#include <geometry_msgs/PoseStamped.h>
#include <geometry_msgs/Quaternion.h>
#include <tf/transform_broadcaster.h>
#include <message_filters/sync_policies/approximate_time.h>
#include <sensor_msgs/PointCloud.h>
#include <sensor_msgs/PointCloud2.h>
#include <sensor_msgs/point_cloud_conversion.h>
#include <tf/LinearMath/Quaternion.h>
#include <tf/transform_datatypes.h>

using namespace message_filters;
using namespace sensor_msgs;
using namespace std;
using namespace geometry_msgs;
namespace rvt = rviz_visual_tools;

class kuka
{

private:
    ros::Subscriber sub;
    ros::NodeHandle nh_;


public:
        kuka(ros::NodeHandle &nh) //constructor 
      {
      nh_=nh;   
      }

        void status() //func showing the actual position (case0)
    {
        sub = nh_.subscribe("/robposi", 1000, &kuka::callback, this); 
        cout<<"status";
    }



        void callback(const geometry_msgs::PointStamped::ConstPtr& rob)
        {
        cout<<"callback  ";
        ROS_INFO_STREAM(endl << "RobCoor.x: "<< rob->point.x << endl << "RobCoor.y: "<< rob->point.y << endl << "RobCoor.z: "<< rob->point.z << endl);
        }


};



int main(int argc, char** argv)
{
    ros::init(argc, argv, "kuka");
        int j;char loop='*';

    ros::NodeHandle nh;

do
    {
     cout<<"-------------------------------------------"<<std::endl;
     cout<<"|0 |check position of robot               |"<<std::endl;
     cout<<"|1 |go to home                            |"<<std::endl;
     cout<<"|2 |go to stored position                 |"<<std::endl;
     cout<<"|3 |enter the position w,x,y,z            |"<<std::endl;
     cout<<"|4 |enter the position of joints          |"<<std::endl;
     cout<<"|5 | exit                                 |"<<std::endl;
     cout<<"-------------------------------------------"<<std::endl;
     cin>>j;
    kuka listen_0(nh);

cout<<"i =   "<<j;

    switch (j){
    case(0):{
cout<<"i hekkddddddddddd   ";
    listen_0.status();
cout<<"i hekk.lj,hk....   ";
    }

    break;

}

    cout <<"would you like to enter new choice y/n?"<<endl;
    cin>> loop;
    }while (loop == 'y');

    return 0;
 }
2019-10-08 10:29:52 -0500 received badge  Scholar (source)
2019-10-08 06:39:57 -0500 commented question callback function doesnt printout the subscribe msg

i tried ros::spinOnce() and also i add do{ /somecode/ }while(loop=='y' && ros::ok()) at the end but the proble

2019-10-08 02:42:17 -0500 commented question callback function doesnt printout the subscribe msg

its the hole program , that my supervisor recommended me to make do while instead of ros spin because it make problems w

2019-10-08 02:41:34 -0500 commented answer callback function doesnt printout the subscribe msg

its the hole program that i am working on , that my supervisor recommended me to make do while instead of ros spin beca

2019-10-08 02:38:59 -0500 received badge  Notable Question (source)
2019-10-07 15:10:38 -0500 received badge  Popular Question (source)
2019-10-07 08:52:53 -0500 answered a question callback function doesnt printout the subscribe msg

include <moveit move_group_interface="" move_group_interface.h=""> include <moveit planning_scene_interface=""

2019-10-07 08:52:53 -0500 received badge  Rapid Responder (source)
2019-10-07 07:56:12 -0500 asked a question callback function doesnt printout the subscribe msg

callback function doesnt printout the subscribe msg hello guys iam new at ROS and iam trying to print the msg and some h