GithubHelp home page GithubHelp logo

wsnewman / learning_ros Goto Github PK

View Code? Open in Web Editor NEW
345.0 345.0 235.0 176.33 MB

repository to accompany "A Systematic Approach to Learning Robot Programming with ROS"

C++ 92.15% CMake 6.05% Java 1.39% MATLAB 0.41%

learning_ros's People

Contributors

leegs avatar lucbettaieb avatar mfkenson avatar mwswartwout avatar rkyuan avatar rojas70 avatar wsnewman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

learning_ros's Issues

Logic Error in Lidar Alarm

Line 37 of lidar_alarm.cpp: ping_index_ = (int) (0.0 -angle_min_)/angle_increment_;
Should be ping_index_ = (int) ((0.0 -angle_min_)/angle_increment_);

Right now it casts 0.0 - angle_min_ to an integer and then divides by the double angle_increment_
Presumably the division should be done in floating point format and the final result should be cast to an integer, hence the necessity of an extra pair of parentheses.

nav_core/base_local_planner.h: No such file or directory

Hi there, I just recently bought your book "A systematic approach to learning robot programming with ROS". While trying catkin_make on page 15, there seems to be a compile error:

[ 0%] Built target _example_gazebo_set_state_generate_messages_check_deps_SrvInt
In file included from /home/rudisoft/ros_ws/src/learning_ros/Part_4/example_nav_plugin/src/minimal_nav_plugin.cpp:2:0:
/home/rudisoft/ros_ws/src/learning_ros/Part_4/example_nav_plugin/include/example_nav_plugin/minimal_nav_plugin.h:4:41: fatal error: nav_core/base_local_planner.h: No such file or directory
#include <nav_core/base_local_planner.h>
^
compilation terminated.

Removing the part 4 folder resolves the issue as a workaround.

Extra file

sine_commander.cpp (which isn't actually a sine commander) somehow ended up in /Part_2/minimal_joint_controller.

Issue w/ RViz Config

The publish_selected_points plugin was updated on 3/6/15 and the name was changed to to selected_points_publisher. The RViz config files in this repo are thus now broken, because they reference (line 233 in mobot_w_lidar_and_kinect.rviz)
Class: rviz_plugin_selected_points_topic/PublishSelectedPoints which should now be
Class: rviz_plugin_selected_points_publisher/SelectedPointsPublisher

This won't result in an error for anyone currently using the learning_ros_external_pkgs repo but does cause a runtime error for anyone with the newest version of the plugin. This doesn't cause a crash and can be solved simply by removing the plugin from the RViz toolbar and re-adding it, but it would probably be better to just update everything to the most recent version.

error: invalid new-expression of abstract class type ‘MinimalPlanner’ return new C;

Hello,

I am trying build the packages, but when I execute "catkin_make", the following error appears:

/opt/ros/melodic/include/class_loader/meta_object.hpp: In instantiation of ‘B* class_loader::impl::MetaObject<C, B>::create() const [with C = MinimalPlanner; B = nav_core::BaseLocalPlanner]’:
/home/jose/catkin_ws/src/learning_ros/Part_4/example_nav_plugin/src/minimal_nav_plugin.cpp:54:1: required from here
/opt/ros/melodic/include/class_loader/meta_object.hpp:196:12: error: invalid new-expression of abstract class type ‘MinimalPlanner’
return new C;

fatal error: moveit_msgs/DisplayTrajectory.h: No such file or directory

Reproducing the issue

  1. fresh installation of ubuntu 20.04
  2. fresh installation of ROS noetic using https://github.com/wsnewman/learning_ros_setup_scripts/blob/master/install_ros_and_tools_noetic.sh
mkdir -p ~/ros_ws/src/
cd ~/ros_ws/src/
git clone --recursive https://github.com/wsnewman/learning_ros.git
git clone --recursive https://github.com/wsnewman/learning_ros_external_pkgs_noetic.git
cd ~/ros_ws/
rosdep install --from-paths src --ignore-src -r -y
catkin_make

catkin_make reported error below.

/home/kenson/ros_ws/src/learning_ros/Part_5/cartesian_planner/src/ur10_cart_move_as.cpp:28:9: fatal error: moveit_msgs/DisplayTrajectory.h: No such file or directory
   28 | #include<moveit_msgs/DisplayTrajectory.h>
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

Part 3: lidar_wobbler: [rosrun] Couldn't find executable named wobbler_sine_commander

I tried following the tutorial on page 250.
I could start gazebo and launch the lidar_wobbler.launch.
When I tried executing rosrun lidar_wobbler wobbler_sine_commander I got the following error: [rosrun] Couldn't find executable named wobbler_sine_commander
The file exists, the setup.bash is sourced and if I use roscd lidar_wobbler, the terminal finds the package.

elias@elias-ThinkPad:~$ cd ws_newman/
elias@elias-ThinkPad:~/ws_newman$ source devel/setup.bash
elias@elias-ThinkPad:~/ws_newman$ roscd lidar_wobbler
elias@elias-ThinkPad:~/ws_newman/src/learning_ros/Part_3/lidar_wobbler$ tree -L 2
.
├── CMakeLists.txt
├── config
│   └── one_dof_ctl_params.yaml
├── launch
│   ├── laser_assembler.launch
│   └── lidar_wobbler.launch
├── model
│   └── lidar_wobbler.urdf
├── package.xml
├── README.md
└── src
    ├── assemble_scans_test_client.cpp
    ├── lidar_transformer.cpp
    ├── lidar_wobbler.cpp
    └── wobbler_sine_commander.cpp

4 directories, 11 files
elias@elias-ThinkPad:~/ws_newman/src/learning_ros/Part_3/lidar_wobbler$ rosrun lidar_wobbler wobbler_sine_commander
[rosrun] Couldn't find executable named wobbler_sine_commander below /home/elias/ws_newman/src/learning_ros/Part_3/lidar_wobbler

I'm a newbie at ROS, so the answer could be really simple, and I am missing something. My CMakeLists.txt is the same as in the repository, since I didn't change anything.
I also deleted everything and cloned the repository again. Both times I got some error. A few of them regard the baxter package from Part 5, so it shouldn't affect me. The second error came in the end, and I could not find a reason for it online. It is:
Invoking "make -j16 -l16" failed
I'm grateful for every hint and advice. :)

ROS课程报告

1、添加模型文件
(1)coke_can模型的半径相比baxter的钳子张开距离大,因此选用了另外的圆柱体的模型,其中半径为2cm,高度为15cm。

(2)模型的launch文件添加在learning_ros/exmpl_models/launch的文件夹下,内容如下:

(3)在learning_ros/Part_6/baxter_variations/baxter_on_mobot.xacro中调用模型的launch文件。

2、根据模型文件修改程序
(1)object_finder_as.cpp
更改模型的高度为0.15,并相应调整搜索点云的区域。此外还将目标的旋转角度固定为(x,y,z,w)=0,0,0,0。

double block_height = 0.15;
found_object = pclUtils_.find_plane_fit(0.3, 0.9, -0.7, 0.3, surface_height + 0.14, surface_height + 0.16, 0.001,

plane_normal, plane_dist, major_axis, centroid);

(2)rethink_gripper_rt_manip_fncs.cpp
添加新的关于机械臂抓取可乐罐的函数,并修改机械臂的位姿。其中旋转角度为(x,y,z,w)=1,1,-1,0。

object_pose_wrt_gripper.orientation.x = 1.0;
object_pose_wrt_gripper.orientation.y = 1.0; //x-axis anti-parallel, z-axis anti-parallel:
object_pose_wrt_gripper.orientation.z = -1.0; //grasp from side  

(3)fetch_and_stack_client.cpp
将所有 ObjectIdCodes设置成 COKE_CAN_UPRIGHT

goal.object_code= ObjectIdCodes::COKE_CAN_UPRIGHT;

视频文件
链接: https://pan.baidu.com/s/1_j6YY5pKcBpbSC8lD8eRoQ 密码: 72xd

Logic Exception when running Part_5/baxter/baxter_playfile_nodes/src/baxter_multitraj_player.cpp

This logic exception occurs when you run:

rosrun baxter_playfile_nodes baxter_multitraj_player

And have properly launched the other windows:

roslaunch baxter_gazebo baxter_world.launch 
rosrun baxter_tools enable_robot.py -e
rosrun baxter_trajectory_streamer left_arm_as 
rosrun baxter_trajectory_streamer rt_arm_as 

The error message is:

terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string::_S_construct null not valid

Kinetic

I am working with your great book.
Unfortunately the code does not run with Kinetic Kame.
I think the issue is that you are using catkin_simple in the CMakeLists.
Best, Erwin

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.