Comments (7)
I encountered this too, and decided to move on and just read the chapter w/o practicing (I'll find something else to cover that) due to compile errors which I assumed were because of API changes (read the kinetic part below), it would be awesome to get this fixed in another edition.
I chose to follow the book using ROS Kinetic, and so far (I'm on chapter 12) this has been the only chapter that didn't work with trivial fixes (trivial as in just replace "indigo" with "kinetic" in the packages you're installing). Skimming through the remaining chapters it might also be the only one throughout the book, but I can't be 100% sure without actually trying.
from rosbook.
from rosbook.
Awesome stuff, thanks for your effort! Interesting that you listed chapter 12 as being buggy on Kinetic. The line shows up fine for me in Gazebo and I can run the python examples fine. Or rather almost fine, I have some issues with images not showing up in the window unless I create the window in the topic callback. No clue as to why so far but after some googling it seems people have all kinds of strange behaviors with imshow, named windows and waitKey. Need to investigate some more later.
from rosbook.
That means it's probably either a bug that has been fixed since I set up that code 6 months ago, or something in my environment (Gazebo can sometimes be sensitive to your environment not being quite right). If it's working for you then that's great; it's one less thing I need to fix! :)
from rosbook.
Regarding the existing bitbucket repositories on Indigo/14.04, I have tested them and they work just fine. All that needs changing is adding deprecated_
to the repository name:
git clone -b indigo https://bitbucket.org/nasa_ros_pkg/deprecated_nasa_r2_simulator.git
git clone -b indigo https://bitbucket.org/nasa_ros_pkg/deprecated_nasa_r2_common.git
Unfortunately, they do not build as-is on Kinetic/16.04. The gazebo_gripper
package has numerous errors in libraries such as sdformat
and ignition
which appear to relate to the compiler version. Because the code is deprecated, I do not think it is feasible to try and make it work on Kinetic.
from rosbook.
Here's my progress on the new R2 code.
Possible repository/package mappings from bitbucket to gitlab
gazebo_gripper [email protected]:nasa-jsc-robotics/r2_gazebo_gripper.git
gazebo_interface [email protected]:nasa-jsc-robotics/r2_gazebo_interface.git
gazebo_taskboard [email protected]:nasa-jsc-robotics/iss_taskboard_gazebo.git
nasa_r2_simulator
r2_controllers_ros
r2_gazebo [email protected]:nasa-jsc-robotics/r2_gazebo.git
nasa_r2_common
nasa_r2_common_msgs
r2_control [email protected]:nasa-jsc-robotics/r2_supervisors_control.git
r2_description [email protected]:nasa-jsc-robotics/r2_description.git
r2_fullbody_moveit_config [email protected]:nasa-jsc-robotics/r2_moveit_config.git
r2_moveit_config [email protected]:nasa-jsc-robotics/r2_upperbody_moveit_config.git
The installation instructions on the below webpage are fairly accurate. I didn't bother with the rosdeps stuff as I assumed I already had everything I needed; this assumption turned out to be correct.
https://gitlab.com/nasa-jsc-robotics/robonaut2/wikis/R2%20Gazebo%20Simulation
To grab whole workspace:
mkdir -p chessbot/src
cd chessbot/src
catkin_init_workspace
git clone [email protected]:nasa-jsc-robotics/r2_workspaces.git
vcs import < ~/git/r2_workspaces/public_sim.yaml
cd robot_instance
git checkout 2016_11_7_ar_demo
cd ../..
catkin_make
Kinetic
r2_supervisors_control depends on driver_base, which is both deprecated and not available in kinetic. It uses the SensorLevels message from this package, which has been moved to dynamic_reconfigure. Change the import and dependency specifications to dynamic_reconfigure and it compiles.
iss_taskboard_gazebo does not compile with the version of Boost included in Ubuntu 16.04 (1.58?). The file plugins/src/ISSTaskboardPanelA.cpp needs to include boost/algorithm/string/replace.hpp to get boost::replace_all().
In r2_gazebo, the file r2c.gazebo.sensors.xacro includes two sensor xacro files, but includes them by path relative to the parent directory, not the directory that r2c.gazebo.sensors.xacro is in. This fixes the problem:
diff --git a/xacro/sensors/r2c.gazebo.sensors.xacro b/xacro/sensors/r2c.gazebo.sensors.xacro
index 01d4e64..aa89f65 100644
--- a/xacro/sensors/r2c.gazebo.sensors.xacro
+++ b/xacro/sensors/r2c.gazebo.sensors.xacro
@@ -4,8 +4,8 @@
xmlns:sensor="http://playerstage.sourceforge.net/gazebo/xmlschema/#sensor"
xmlns:xacro="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface">
- <xacro:include filename="sensors/grasshopper2.gazebo.xacro" />
- <xacro:include filename="sensors/asus.gazebo.xacro" />
+ <xacro:include filename="grasshopper2.gazebo.xacro" />
+ <xacro:include filename="asus.gazebo.xacro" />
<!-- Left Camera -->
<joint name="${robot_name}fixed/left_camera_frame/left_camera_optical_frame" type="fixed">
<parent link="${robot_name}head/left_camera_frame"/>
The correct MoveIt! configuration is changed from r2_moveit_config
to r2_upperbody_moveit_config
. The full-body one does have a "no_legs" parameter but it seemed to be causing problems which I haven't had time to fix yet.
With the above process and fixes, it compiles on Kinetic/16.04, and Gazebo launches. However, it does not respond to MoveIt! control. Despite r2_supervisors_control/r2_test.py reporting that the test was a success, the simulated robot never moves and appears to be freely moving under gravity.
Indigo
Include fixes made above, except for the xacro file change (is this a change in behaviour in xacro between Indigo and Kinetic?).
The ros-indigo-log4cpp package must be installed.
Compiles, and when run the robot appears to be controlling its joints (they do not fall freely under gravity). The r2_ready_pose.py and r2_ready_pose_high.py scripts do control the joints.
MoveIt! samples in the book do not work. They all fail to find a motion plan. Output of r2_cli.py:
ABORTED: No motion plan found. No execution attempted.
Output of move_group:
[ INFO] [1488266368.974722161, 222.025000000]: Combined planning and execution request received for MoveGroup action. Forwarding to planning and execution pipeline.
[ INFO] [1488266368.975038126, 222.025000000]: Planning attempt 1 of at most 1
[ INFO] [1488266368.977612917, 222.025000000]: No planner specified. Using default.
[ INFO] [1488266368.978463626, 222.025000000]: RRTConnect: Starting planning with 1 states already in datastructure
[ERROR] [1488266373.985949642, 225.201000000]: RRTConnect: Unable to sample any valid states for goal tree
[ INFO] [1488266373.986062813, 225.201000000]: RRTConnect: Created 1 states (1 start + 0 goal)
[ INFO] [1488266373.986082825, 225.201000000]: No solution found after 5.008049 seconds
[ INFO] [1488266374.055969839, 225.251000000]: Unable to solve the planning problem
from rosbook.
I think that, given that the book targets Indigo, the easiest option is to create copies here of the two NASA BitBucket repositories that have been marked as deprecated, and alter the instructions in the book for cloning the code to use the URLs for these instead of the BitBucket URLs. A note could be added pointing out that a newer version of the code is available at NASA's GitLab site, but the sample code in the book may not work as-is with it.
from rosbook.
Related Issues (20)
- [Text improvement] Chapter 4: Move description of using rosservice HOT 1
- Suggestions to improve explanations and text HOT 1
- Corrections to text and code samples HOT 1
- Possibly incorrect wheel arrangement on Tortoisebot HOT 1
- slam_gmapping parameter prefix error
- rosparam set the wrong name
- chapter 12 codes freezing HOT 1
- Compatibility with Tiago HOT 1
- aisle.world file need correcting
- Can't install ros-indigo-fetch*? HOT 1
- General "Custom Message" Issues HOT 1
- Can't run basics topic publisher.
- Please help me understand the origin tag in URDF HOT 2
- Chapter 21: src/code/cpp example code has errors HOT 1
- No motion plan found HOT 2
- Unable to run the python file red_light_green_light.py HOT 3
- key_publisher.py does not work HOT 5
- Error in Chapter 8 Page 126 under rviz heading line 6
- is it possible to simulate Nasa's R2 on ROS Noetic?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rosbook.