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

Cannot rosmake teleop_base, getting fatal error in Fuerte

asked 2012-07-29 11:54:23 -0500

breakspirit gravatar image

updated 2014-04-20 14:09:33 -0500

ngrennan gravatar image

When I try to rosmake teleop_base, I get the following error: fatal error: joy/Joy.h: No such file or directory

I've got joy installed, why aren't I able to rosmkae teleop_base? I'm running Fuerte. Running "Rospack find joy" returns the following: /opt/ros/fuerte/stacks/joystick_drivers/joy

I tried redownloading teleop_base according this this site: http://www.ros.org/wiki/stage/Tutorials/SimulatingOneRobot and have not have success. What should I do?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
4

answered 2012-08-05 08:35:54 -0500

breakspirit gravatar image

I think I've figured it out. I included sensor_msgs/Joy to teleop_base.cpp. That lead to several new errors.

In teleop_base.cpp, replace line 122 with void joy_cb(const sensor_msgs::Joy::ConstPtr& joy_msg) Anywhere that says joy_msg->get_axes_size() should be replaced with joy_msg->axes.size() Anywhere that says joy_msg->get_buttons_size() should be replaced with joy_msg->buttons.size()

In teleop_base_keyboard.cpp, replace line 104 with boost::thread t = boost::thread(boost::bind(&TBK_Node::keyboardLoop, &tbk));

After that, teleop_base should succeed when running rosmake.

edit flag offensive delete link more

Comments

Thanks, this worked for me. I also had to "sudo apt-get install ros-groovy-joystick-drivers" since the teleop_base has an unlisted dependency.

KevinNickels gravatar image KevinNickels  ( 2013-09-11 11:38:24 -0500 )edit

Thanks. All this worked for me. There were slight hiccups though. 1) It was line 121 for me, instead of line 122. 2) I was making the dumb mistake of not removing- '#include "joy/Joy.h"' line 3) Third dumb mistake was including "sensor_msg/Joy" instead of "sensor_msg/Joy.h" 4) KevinNickels comment.

devesh gravatar image devesh  ( 2013-11-19 23:12:37 -0500 )edit
0

answered 2012-07-29 15:34:00 -0500

joq gravatar image

The correct package is now sensor_msgs/Joy.

edit flag offensive delete link more

Comments

In teleop_base.cpp, replacing #include"joy/Joy.h" with #include "sensor_msgs/Joy.h" creates another error. Line 122 of teleop_base.cpp uses const joy::Joy::ConstPtr& joy_msg as a parameter. I have not yet figured out how this needs to be altered to work with sensor_msgs/Joy

breakspirit gravatar image breakspirit  ( 2012-08-05 08:12:01 -0500 )edit
1

This should be then: sensor_msgs::Joy::ConstPtr& joy_msg

Sebastian Rockel gravatar image Sebastian Rockel  ( 2014-04-01 02:01:32 -0500 )edit

Question Tools

Stats

Asked: 2012-07-29 11:54:23 -0500

Seen: 2,483 times

Last updated: Aug 05 '12