0
$\begingroup$

Rosanswers logo

Hi,

I just tried to build the joy package after checking out the whole joystick_drivers stack and got a following error:

  [100%] Building CXX object CMakeFiles/joy_node.dir/joy_node.o
  /home/ubuntu/ros_packages/joystick_drivers/joy/joy_node.cpp:39:29: fatal error: sensor_msgs/Joy.h: No such file or directory
  compilation terminated.
  make[3]: *** [CMakeFiles/joy_node.dir/joy_node.o] Error 1

so it appears the build system looks for Joy.h in std_msgs, whereas it can be found under joy/msg_gen/cpp/include/joy/Joy.h. What change to I have to make to make the build go without errors?

BTW, I also found another difference between package install and the source. The lines:

  <depend package="sensor_msgs"/>

  <depend package="rosbag"/>
  <export>
    <rosbag migration_rule_file="migration_rules/Joy.bmr"/>
  </export>

appear in manifest.xml in source but don't come up in a joy version installed from ubuntu packages. Of course removing the above lines doesn't fix the error.


EDIT: So I copied joy/msg/Joy.msg to sensor_msgs/msg and rebuilt the whole thing, but this didn't help either, as Joy.msg obviously changed and after doing what I just mentioned I got:

[100%] Building CXX object CMakeFiles/joy_node.dir/joy_node.o
  /home/ubuntu/ros_packages/joystick_drivers/joy/joy_node.cpp: In member function ‘int Joystick::main(int, char**)’:
  /home/ubuntu/ros_packages/joystick_drivers/joy/joy_node.cpp:217:19: error: ‘struct sensor_msgs::Joy’ has no member named ‘header’
  make[3]: *** [CMakeFiles/joy_node.dir/joy_node.o] Error 1

So I'll probably just revert to some older joy version until fixed.


Originally posted by tom on ROS Answers with karma: 1079 on 2011-08-01

Post score: 0


Original comments

Comment by Jie Sky on 2014-11-25:
Do you know how to use a normal joystick to control a turtlebot based kobuki?I have some trouble with it . I refer to this website:http://wiki.ros.org/turtlebot_teleop/Tutorials/hydro/Joystick%20Teleop

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

Joy.msg is currently in tick tock, which may cause confusion for some people. Joy.msg is in the process of migrating to sensor_msgs. If you would like to use trunk for joystick_drivers you must also use the trunk or electric beta of common_msgs which contains sensor_msgs. The old Joy.msg is still in joy package to give everyone who is still using the old Joy.msg time to migrate.


Originally posted by mmwise with karma: 8372 on 2011-08-02

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$
0
$\begingroup$

Rosanswers logo

AFAIK, the message was recently moved to sensor_msgs. For me (from packages) it is still in the joy package. If you use the one from source and build this against the ubuntu packages ROS, you will need to copy the msg to the joy/msg in the source until there are updated packages or use the sensor_msgs from source.


Originally posted by dornhege with karma: 31395 on 2011-08-01

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by tom on 2011-08-01:
Unfortunetely this didn't help, I edited my question.

Comment by tom on 2011-08-01:
I'm using sensor_msgs from source, I updated it with svn up, I'm on revision 37696 and nothing changed, ie. Joy.msg is still not there. So probably I need to copy Joy.msg from joy/msg to sensor_msgs/msg and rebuild sensor_msgs, I'll try that and let know, thanks.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.