Ask Your Question

nikkk's profile - activity

2018-02-11 00:41:13 -0500 received badge  Famous Question (source)
2018-02-11 00:41:13 -0500 received badge  Notable Question (source)
2017-08-01 13:01:24 -0500 received badge  Famous Question (source)
2017-07-07 00:26:21 -0500 received badge  Famous Question (source)
2017-03-30 23:09:54 -0500 received badge  Popular Question (source)
2017-03-20 14:50:29 -0500 received badge  Notable Question (source)
2017-01-31 04:34:20 -0500 received badge  Famous Question (source)
2017-01-27 09:14:53 -0500 received badge  Notable Question (source)
2017-01-26 21:27:54 -0500 received badge  Popular Question (source)
2017-01-26 20:56:52 -0500 commented answer Publish at the time of a vector

Thank you for your complete answer. I try to publish in the clock topic but my problem is that it doesn't publish in the correct time. And then I can't use a dt because there's a differenza delta time between each successive recorded timestamps.

2017-01-26 20:52:01 -0500 received badge  Popular Question (source)
2017-01-26 11:51:06 -0500 asked a question Publish at the time of a vector

Dears, I have a vector containing double type numbers representing the ros time that I recorded from a previous simulation. I need to publish data of a node at this given time. I try to explain better: I have the x,y,z coordinates of a point and the respective time at which this point were recorded. I need to publish these x,y,z coordinates at the exact time that I recorded to use it in other subscribers nodes. What can I use? I'm able to visualize a marker in rviz using these 3 coordinates at the time using the marker.header.timestamp but I'm not able to publish at the exact time the msg.position.x y and z, also because I normally use the sleep with ros::Rate. I don't understand if I can use a ros::Timer, or ros::Time, or using a node that publish in the /clock topic.

Thank you for yours answers.

2017-01-25 20:24:15 -0500 received badge  Notable Question (source)
2017-01-23 12:02:44 -0500 received badge  Scholar (source)
2017-01-23 12:00:33 -0500 commented answer Use variables in main from callback

Thank you for the answer. This works without problem.

2017-01-23 10:55:37 -0500 asked a question Use variables in main from callback

I need to use three variables that I subscribe from another topic and use it in the main loop. I know that I can use boost function but I don't understand how to use in my case:


double theta1f;
double theta2f;
double theta3f;

class Listener
{
public:
    void callback(const std_msgs::Float32MultiArray::ConstPtr& msg);
};
void Listener::callback(const std_msgs::Float32MultiArray::ConstPtr& msg)
{
    theta1f = msg->data[0];
    theta2f = msg->data[1];
    theta3f = msg->data[2];
}
int main(int argc, char **argv)
{
    ros::init(argc, argv, "node_joint");
    ros::NodeHandle nh;
    ros::Rate loop_rate(30); 
    Listener listener;
    ros::Subscriber sub = nh.subscribe<std_msgs::float32multiarray>("topic_subscribed", 1, &Listener::callback, &listener);
while (ros::ok())
    {  
      cout  theta1f endl;
      }
    loop_rate.sleep();
    ros::spin();
    return 0;
}

I need to use theta1f in this main (cout is only an example and i know that is missing the <<). How can I do it using boost function? There are other solutions better than this?

Thank you for your answers.

2017-01-23 08:51:51 -0500 received badge  Popular Question (source)
2017-01-23 03:43:58 -0500 commented answer Publish Joint position step by step

Thank you but maybe i didn't explain well. I already use joint state message but what I need is to publish to the node that use joint state message to the robot, a correct message that include the joint angle for each of the three joints. And these two nodes have to both subscribe and publish.

2017-01-22 11:27:16 -0500 asked a question Publish Joint position step by step

Greetings, I need an advice about how to perform my robot simulation. I have a node that subscribe a topic and use the data subscribed to create a vector with all the angle that a joint has to reach through the final joint angle. I have three different joints, which is the best message to publish that contains the three joint angles? How can I publish them step by step. How can I make the second node that subscribe these joint angles?

Thank you

2017-01-21 09:58:51 -0500 received badge  Enthusiast
2017-01-16 07:22:22 -0500 asked a question Simulation robot in Rviz

Greetings, I am currently using ROS Kinetic and Linux Ubuntu 16.04. I have to perform a simulation about a robot, cyton_gamma_1500 that I can't use at this moment. I succeed to simulate it in rviz, giving the joint position using sensor_msgs/JointState, but what I need now is to compute a simulated trajectory, following a cartesian path for example, giving as parameters the initial and final joint positions, either joint velocities or time to compute the trajectory, and see it in rviz because until now I can only give the final position that the robot reach immediately.

Thank you for your help.

2017-01-16 07:22:22 -0500 asked a question Simulation robot in Rviz

Greetings, I am currently using ROS Kinetic and Linux Ubuntu 16.04. I have to perform a simulation about a robot, cyton_gamma_1500 that I can't use at this moment. I succeed to simulate it in rviz, giving the joint position using sensor_msgs/JointState, but what I need now is to compute a simulated trajectory giving as parameters the initial and final joint positions, either joint velocities or time to compute the trajectory, and see it in rviz because until now I can only give the final position that the robot reach immediately.

Thank you for your help.