PDA

View Full Version : Dan's ROS Journey



TXBDan
08-24-2016, 07:36 PM
Hey guys, I'm going to document as i go here. It'll be somewhat redundant to other guides, but maybe someone will learn something.

So far i have a MKII hexapod, Raspberry Pi 3, and a USB2AX for hardware.

For software i'm currently loading up Ubuntu Mate 16.04 and ROS Kinetic. Does this seem like a reasonable idea?

I'm following the ROS install guide here:
http://wiki.ros.org/kinetic/Installation/Ubuntu

I assume being on a Pi and all that i should skip all the GUI/graphical stuff and just install base ROS?

KevinO
08-24-2016, 07:47 PM
Sounds like a good start.

I need to push a kinetic fork up to my github with the minor changes that happened. Plus warn people that sound play package has lost support in kinetic and you need to pull it down and compile it yourself if you want all the sound features. (it will run without it fine though)

KurtEck
08-24-2016, 09:26 PM
I sort of mentioned the steps I took to get everything compiled on UP board on Kenetic in the posting: http://forums.trossenrobotics.com/showthread.php?6725-ROS-Hexapod-project-Golem-MX-64-4dof&p=72135&highlight=#post72135

TXBDan
08-24-2016, 10:19 PM
Hey Kevin, I'm installing your hexapod_ros and noticed that gazebo is a dependancy. It's 823mb and looks like a graphical sim. Is this required for a "headless" base install? Can the hexapod robot function without it?

Also is there a way to have the ROS "server" on the RPi3 serve into to the GUI/simulat/rviz graphical stuff running on a PC?

Thanks

KurtEck
08-24-2016, 11:07 PM
I would not do gazebo. You can make it not build by putting a file CATLIN_IGNORE in its top folder.

KevinO
08-25-2016, 11:48 AM
Hey Kevin, I'm installing your hexapod_ros and noticed that gazebo is a dependancy. It's 823mb and looks like a graphical sim. Is this required for a "headless" base install? Can the hexapod robot function without it?

Also is there a way to have the ROS "server" on the RPi3 serve into to the GUI/simulat/rviz graphical stuff running on a PC?

Thanks

No it doesn't need it. That's a good point, maybe I should break it out as a "headless" base version then all the fun stuff on top. (Try it out someday. It is fun to lift your hexapod up in the air and let it drop in gazebo. NOT IN REAL LIFE THOUGH!)

TXBDan
08-25-2016, 08:13 PM
I'm catkin ignoring gazebo and sound. catkin_make results in:
[ 81%] Built target hexapod_msgs_generate_messages_eus
Scanning dependencies of target gait
[ 83%] Building CXX object hexapod_ros/hexapod_controller/CMakeFiles/gait.dir/src/gait.cpp.o
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.
hexapod_ros/hexapod_controller/CMakeFiles/ik.dir/build.make:62: recipe for target 'hexapod_ros/hexapod_controller/CMakeFiles/ik.dir/src/ik.cpp.o' failed
make[2]: *** [hexapod_ros/hexapod_controller/CMakeFiles/ik.dir/src/ik.cpp.o] Error 4
CMakeFiles/Makefile2:3059: recipe for target 'hexapod_ros/hexapod_controller/CMakeFiles/ik.dir/all' failed
make[1]: *** [hexapod_ros/hexapod_controller/CMakeFiles/ik.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 85%] Linking CXX shared library /home/dan/catkin_ws/devel/lib/libgait.so
[ 87%] Linking CXX shared library /home/dan/catkin_ws/devel/lib/libservo_driver.so
[ 87%] Built target gait
[ 87%] Built target servo_driver
[ 89%] Linking CXX executable /home/dan/catkin_ws/devel/lib/hexapod_teleop_joystick/hexapod_teleop_joystick
[ 89%] Built target hexapod_teleop_joystick
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j4 -l4" failed
[email protected]:~/catkin_ws$

any ideas? hrm

Edit: nevermind, i simply ran it again and this time it worked.

TXBDan
08-25-2016, 08:55 PM
Things are moving along and i've roslaunch'ed hexapod-simple. However its not finding my USB2AX. The device has a green light and exists in /dev/ttyACM0. I verified that is the device by unplugging, watchin ttyACM0 disappear, replugging, seeing it reappear.

So that leads to a Servo Communication Failed!

Have you guys had any trouble with this before?

TXBDan
08-25-2016, 10:09 PM
Things are moving along and i've roslaunch'ed hexapod-simple. However its not finding my USB2AX. The device has a green light and exists in /dev/ttyACM0. I verified that is the device by unplugging, watchin ttyACM0 disappear, replugging, seeing it reappear.

So that leads to a Servo Communication Failed!

Have you guys had any trouble with this before?

Fixed it. Silly permissions. I had to add myself to the dialout group.

Now things seem to launch well. No errors or warnings.




NODES
/
Hexapod_Controller (hexapod_controller/hexapod_controller)
Hexapod_Teleop_Joystick (hexapod_teleop_joystick/hexapod_teleop_joystick)
Playstation3_Controller (joy/joy_node)
robot_state_publisher (robot_state_publisher/state_publisher)


auto-starting new master
process[master]: started with pid [2886]
ROS_MASTER_URI=http://localhost:11311


setting /run_id to 77b9e36c-6b3a-11e6-94d9-b827ebeff586
process: started with pid [2899]
started core service
process[Playstation3_Controller-2]: started with pid [2916]
process[Hexapod_Teleop_Joystick-3]: started with pid [2917]
process[Hexapod_Controller-4]: started with pid [2924]
process[robot_state_publisher-5]: started with pid [2935]


Nothing seems to be happening though... How do i actually make the robot move? Or get some terminal output? :-D

TXBDan
08-25-2016, 10:32 PM
Read through the comments in some code and discovered the Start button! hah so sensible i didn't even think of it.

Looks like i have one servo who's dead, probably lost his ID, but the rest seem to be walking around on top of a paint can quite nicely.

Cool, man!

KevinO
08-26-2016, 11:52 AM
Yeah, sorry I should work on some actual "How to." documentation. Start Button FTW!