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

Revision history [back]

click to hide/show revision 1
initial version

Hi. First of all thanks for your responses Did you do this @130s ?

I am trying it. I have done this:

  geometry_msgs::Twist cmd;
  geometry_msgs::TwistStamped tiempo;
  cmd.linear.x = 1; 
  cmd.linear.y = 0;
  cmd.linear.z = 0;

  tiempo.header.stamp=5;
  cmd.angular.x = 0;
  cmd.angular.y = 0;
  cmd.angular.z = 4;
  vel_pub_.publish(cmd);

But when it is compiled i can see these errors on terminal

>     /home/alcor/catkin_ws/src/lanzar_velocidades/src/arrayvel.cpp:52:3:
> error: ‘geometry’ has not been
> declared geometry::TwistStamped
> tiempo; ^
> /home/alcor/catkin_ws/src/lanzar_velocidades/src/arrayvel.cpp:52:26:
> error: expected ‘;’ before ‘tiempo’
>     geometry::TwistStamped tiempo; ^ /home/alcor/catkin_ws/src/lanzar_velocidades/src/arrayvel.cpp:57:3:
> error: ‘tiempo’ was not declared in
> this scope tiempo.header.stamp=5;
>     ^ make[2]: * [lanzar_velocidades/CMakeFiles/arrayvel_node.dir/src/arrayvel.cpp.o]
> Error 1 make[1]: *
> [lanzar_velocidades/CMakeFiles/arrayvel_node.dir/all]
> Error 2

Any ideas?

Thanks!