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

SunnyKatyara's profile - activity

2021-10-19 09:49:15 -0500 received badge  Famous Question (source)
2021-09-12 11:16:26 -0500 received badge  Famous Question (source)
2021-09-12 11:16:26 -0500 received badge  Notable Question (source)
2020-06-06 08:20:01 -0500 received badge  Notable Question (source)
2020-02-29 06:32:55 -0500 received badge  Famous Question (source)
2020-02-18 15:14:29 -0500 received badge  Famous Question (source)
2019-12-07 12:39:14 -0500 asked a question How to write the data in txt file into other txt file

How to write the data in txt file into other txt file I am working on reading the data from one file "file1.txt" having

2019-11-28 07:18:55 -0500 received badge  Famous Question (source)
2019-11-28 07:18:55 -0500 received badge  Notable Question (source)
2019-10-27 17:13:53 -0500 received badge  Popular Question (source)
2019-10-27 07:38:27 -0500 commented answer Issue with creating Pose[] pose array

Dear Steve, thanks for your response. The number of poses is seven this time but i want to make changeable from the term

2019-10-26 07:13:53 -0500 edited question Issue with creating Pose[] pose array

Issue with creatin Pose[] pose array Since, i have created my own service whose requests are seven geometry_msgs/Pose po

2019-10-26 07:13:33 -0500 asked a question Issue with creating Pose[] pose array

Issue with creatin Pose[] pose array Since, i have created my own service whose requests are seven geometry_msgs/Pose po

2019-10-16 17:34:26 -0500 received badge  Notable Question (source)
2019-10-14 12:25:01 -0500 received badge  Popular Question (source)
2019-10-12 06:21:25 -0500 asked a question How to use response of service

How to use response of service Since, i have written my own service which takes float values [x, y, z, a, b, c, d] and r

2019-08-10 10:28:52 -0500 marked best answer Issue with reading sensor_msgs

Hello every one, since, i want to read messages from the topic /cartesian/solution which has sensor_msgs and want to then some random topic /panda/pand. For confirmation, i am also printing out one member of topic /cartesian/solution But all the time its showing me zero. It means my callback function is not updating the values to one declared in public class. Because all the time it is showing me zeros for all of these values, which are their inherent assignments. I want to read these from this topic but unable to do it.


Updated Code

using namespace std;

class server {
public:

  std_msgs::Float64 joint_position0, joint_position1, joint_position2, joint_position3, joint_position4, joint_position5, joint_position6, joint_position7, joint_position8, joint_position9, joint_position10, joint_position11, joint_velocity0, joint_velocity1, joint_velocity2, joint_velocity3, joint_velocity4, joint_velocity5, joint_velocity6, joint_velocity7, joint_velocity8, joint_velocity9, joint_velocity10, joint_velocity11;


  void jointStateCallback(const sensor_msgs::JointState::ConstPtr& msg);
}




void server::jointStateCallback(const sensor_msgs::JointState::ConstPtr& msg) {

  joint_position0.data = msg->position[0];
  joint_position1.data = msg->position[1];
  joint_position2.data = msg->position[2];
  joint_position3.data = msg->position[3];
  joint_position4.data = msg->position[4];
  joint_position5.data = msg->position[5];
  joint_position6.data = msg->position[6];
  joint_position7.data = msg->position[7];
  joint_position8.data = msg->position[8];
  joint_position9.data = msg->position[9];
  joint_position10.data = msg->position[10];
  joint_position11.data = msg->position[11];
  joint_velocity0.data = msg->velocity[0];
  joint_velocity1.data = msg->velocity[1];
  joint_velocity2.data =msg->velocity[2];
  joint_velocity3.data = msg->velocity[3];
  joint_velocity4.data = msg->velocity[4];
  joint_velocity5.data = msg->velocity[5];
  joint_velocity6.data = msg->velocity[6];
  joint_velocity7.data = msg->velocity[7];
  joint_velocity8.data = msg->velocity[8];
  joint_velocity9.data = msg->velocity[9];
  joint_velocity10.data = msg->velocity[10];
  joint_velocity11.data = msg->velocity[11];

}

int main(int argc, char** argv) { 
  server objserver;
  ros::init(argc, argv, "mover_node");
  ros::NodeHandle n;
  //ros::AsyncSpinner spinner(1);
  //spinner.start();

  //bool success;

  ros::Subscriber joint_sub = n.subscribe("/catersian/solution", 100, &server::jointStateCallback, &objserver);



while (ros::ok())
   {

  ros::spinOnce();

  cout << objserver.joint_position8.data;
  cout<<"\n";
   }


    return(0);
}
2019-08-10 10:28:52 -0500 received badge  Scholar (source)
2019-08-10 10:20:50 -0500 commented answer Issue with reading sensor_msgs

One last thing, i want to ask you that, how can i read the time from this topic and send it on other topic "/panda/pand"

2019-08-10 10:17:28 -0500 commented answer Issue with reading sensor_msgs

Thank you so much. It was really as mistake with topic name. I did not put head to spelling. But thank you so much. It i

2019-08-10 09:53:49 -0500 commented answer Issue with reading sensor_msgs

but ct2034, when i run the code, it gives me zeros only. It means my callback function is not working. Because all the t

2019-08-10 09:46:32 -0500 received badge  Popular Question (source)
2019-08-10 08:04:27 -0500 edited question Issue with reading sensor_msgs

Issue with reading sensor_msgs Hello every one, since, i want to read messages from the topic "/cartesian/solution" whic

2019-08-10 05:13:08 -0500 commented question Issue with reading sensor_msgs

Sorry, i did not highlight the code. I have highlighted it now. Thank you

2019-08-10 05:12:28 -0500 edited question Issue with reading sensor_msgs

Issue with reading sensor_msgs Hello every one, since, i want to read messages from the topic "/cartesian/solution" whic

2019-08-10 05:12:28 -0500 received badge  Editor (source)
2019-08-10 04:37:57 -0500 commented question Issue with reading sensor_msgs

Dear ct2034, i have updated my post. Since, i want to read the values from topic "/Cartesian/solution" and print out it

2019-08-10 04:36:36 -0500 edited question Issue with reading sensor_msgs

Issue with reading sensor_msgs Hello every one, since, i want to read messages from the topic "/cartesian/solution" whic

2019-08-10 03:42:07 -0500 commented question Issue with reading sensor_msgs

Dear ct2034 and zmk5, thanks for your message. Now, i have changed the syntax of node with class defined instead of usin

2019-08-10 03:42:07 -0500 received badge  Commentator
2019-08-09 09:01:14 -0500 asked a question Issue with reading sensor_msgs

Issue with reading sensor_msgs Hello every one, since, i am read the data from sensor messages and declaring the variabl

2019-08-07 08:56:37 -0500 received badge  Notable Question (source)
2019-08-05 09:14:51 -0500 received badge  Popular Question (source)
2019-08-05 04:42:06 -0500 commented answer Trying to communicate with robot in gazebo

Dear Peter, i want to read the data from topic " Cartesian?interface" but i am running the code, it showing me zeros onl

2019-08-03 08:03:06 -0500 asked a question Issue with creating action client

Issue with creating action client Hello, since i am writing the action client to send the goal to action server, but my

2019-08-02 09:46:04 -0500 commented answer Trying to communicate with robot in gazebo

Can you see; am i doing right? using namespace std; sensor_msgs::JointState JS; float joint_position[12] = {0,0,0,0,0

2019-08-02 08:20:38 -0500 commented answer Trying to communicate with robot in gazebo

This is the output from the OpenSoT as sensor_msgs; name: [panda_joint_x, panda_joint_y, panda_joint_theta, schunk_pw70

2019-08-02 08:17:05 -0500 commented answer Trying to communicate with robot in gazebo

Dear Peter, from open SOT i am getting the position, velocity and effort for each joint in a single message like traject

2019-08-01 10:57:55 -0500 commented answer Trying to communicate with robot in gazebo

Dear Peter, thanks for the information. But actually, i am using OpenSOT software, which is a kind of cartesian planar a

2019-08-01 09:14:06 -0500 answered a question Trying to communicate with robot in gazebo

Dear Peter, thanks for your reply. Actually, i have following concerns; The topic from Cartersian planar gives me the

2019-08-01 06:33:15 -0500 received badge  Popular Question (source)
2019-07-31 10:08:20 -0500 answered a question PoseArray receiving data, not displaying in RViz

Dear Alex Hubers, i am also searching for the same thing. But i want to use action server to send the PoseArray msg to m

2019-07-31 03:35:22 -0500 received badge  Enthusiast
2019-07-29 07:42:31 -0500 asked a question Trying to communicate with robot in gazebo

Trying to communicate with robot in gazebo Since, i am working on mobile manipulation and i am trying to command robot i

2019-07-29 07:42:30 -0500 commented answer error while publishing trajectory_msgs/jointtrajectory msgs

Hello Dinesh, i am also facing the same issue more or less. Since, i am working on motion planning with Cartesian planne

2019-07-28 15:28:49 -0500 answered a question Trajectory Splicing Error

Hello Shreyasgan, I am working on mobile manipulation with Panda arm and i am facing the same issue. I can see my robo

2019-07-28 15:28:49 -0500 answered a question How to subscribe trajectory_msgs/JointTrajectory and publish sensor_msgs/JointState

Hello Jose Brito, did you find the answer? Since i am also looking for same issue. I have data from rviz command that pu

2019-06-19 17:40:13 -0500 commented question Panda falls down in gazebo after spawning

Hello mvish7, hope you are good. Since, i am working with panda too, and when i launch it in Gazebo with fixed base, its

2019-06-19 17:39:26 -0500 commented answer Panda falls down in gazebo after spawning

Hello mvish7, hope you are good. Since, i am working with panda too, and when i launch it in Gazebo with fixed base, its