Hi all,
I am trying to add a **barrett hand** to an **abb IRB 120** arm in a **gazebo** simulation and to run the whole thing using **moveit**.
I have created a file *abb-barrett.xacro* that combines the description of both robots (find files at the end).
I am loading the robot into gazebo as follow:
abb_barrett.launch
abb_barrett_control.launch
abb_barrett_controller.yaml
abb_barrett_controller:
type: position_controllers/JointTrajectoryController
joints:
- joint_1
- joint_2
- joint_3
- joint_4
- joint_5
- joint_6
constraints:
goal_time: 0.6
stopped_velocity_tolerance: 0.05
joint_1: {trajectory: 0.1, goal: 0.1}
joint_2: {trajectory: 0.1, goal: 0.1}
joint_3: {trajectory: 0.1, goal: 0.1}
joint_4: {trajectory: 0.1, goal: 0.1}
joint_5: {trajectory: 0.1, goal: 0.1}
joint_6: {trajectory: 0.1, goal: 0.1}
stop_trajectory_duration: 0.5
state_publish_rate: 25
action_monitor_rate: 10
barrett_hand_trajectory_controller:
type: position_controllers/JointTrajectoryController
joints:
- finger_1_med_joint
- finger_2_med_joint
- finger_3_med_joint
- finger_1_prox_joint
- finger_2_prox_joint
state_publish_rate: 100.0
action_monitor_rate: 50.0
constraints:
goal_time: 100.0 # Override default
finger_1_med_joint:
trajectory: 0.01
finger_2_med_joint:
trajectory: 0.01
finger_3_med_joint:
trajectory: 0.01
finger_1_prox_joint:
trajectory: 0.01
finger_2_prox_joint:
trajectory: 0.01
finger_1_joint1_position_controller:
type: position_controllers/JointPositionController
joint: finger_1_med_joint
pid: {p: 1.0, i: 0.0, d: 0.0}
finger_2_joint1_position_controller:
type: position_controllers/JointPositionController
joint: finger_2_med_joint
pid: {p: 1.0, i: 0.0, d: 0.0}
finger_3_joint1_position_controller:
type: position_controllers/JointPositionController
joint: finger_3_med_joint
pid: {p: 1.0, i: 0.0, d: 0.0}
finger_1_joint2_position_controller:
type: position_controllers/JointPositionController
joint: finger_1_prox_joint
pid: {p: 1.0, i: 0.0, d: 0.0}
finger_2_joint2_position_controller:
type: position_controllers/JointPositionController
joint: finger_2_prox_joint
pid: {p: 1.0, i: 0.0, d: 0.0}
Then I am lauching the moveit side of things as follow:
with
abb_barrett_controller_joint_names.yaml"
controller_joint_names: ['joint_1', 'joint_2', 'joint_3', 'joint_4', 'joint_5', 'joint_6' ,'finger_1_med_joint','finger_1_prox_joint','finger_2_med_joint','finger_2_prox_joint','finger_3_med_joint']
and
controllers.yaml:
controller_list:
- name: abb_barrett_controller
action_ns: follow_joint_trajectory
type: FollowJointTrajectory
default: true
joints:
- joint_1
- joint_2
- joint_3
- joint_4
- joint_5
- joint_6
- name: finger_1_joint1_position_controller
action_ns: follow_joint_trajectory
type: FollowJointTrajectory
default: true
joints:
- finger_1_med_joint
- name: finger_1_joint2_position_controller
action_ns: follow_joint_trajectory
type: FollowJointTrajectory
default: true
joints:
- finger_1_prox_joint
- name: finger_2_joint1_position_controller
action_ns: follow_joint_trajectory
type: FollowJointTrajectory
default: true
joints:
- finger_2_med_joint
- name: finger_2_joint2_position_controller
action_ns: follow_joint_trajectory
type: FollowJointTrajectory
default: true
joints:
- finger_2_prox_joint
- name: finger_3_joint1_position_controller
action_ns: follow_joint_trajectory
type: FollowJointTrajectory
default: true
joints:
- finger_3_med_joint
Everything seems find and I am able to move the arm it self using Rviz. However when trying to control the group corresponding to the hand It get the following error:
[ERROR] [1510133470.606385057, 43.138000000]: Unable to identify any set of controllers that can actuate the specified joints: [ finger_1_med_joint finger_1_prox_joint finger_2_med_joint finger_2_prox_joint finger_3_med_joint ]
[ERROR] [1510133470.606397269, 43.138000000]: Known controllers and their joints:
controller '' controls joints:
joint_1
joint_2
joint_3
joint_4
joint_5
joint_6
[ERROR] [1510133470.606407504, 43.138000000]: Apparently trajectory initialization failed
The controller seem however to be loaded
rosservice call /controller_manager/list_controllers
controller:
-
name: joint_state_controller
state: running
type: joint_state_controller/JointStateController
hardware_interface: hardware_interface::JointStateInterface
resources: []
-
name: abb_barrett_controller
state: running
type: position_controllers/JointTrajectoryController
hardware_interface: hardware_interface::PositionJointInterface
resources: ['joint_1', 'joint_2', 'joint_3', 'joint_4', 'joint_5', 'joint_6']
-
name: barrett_hand_trajectory_controller
state: running
type: position_controllers/JointTrajectoryController
hardware_interface: hardware_interface::PositionJointInterface
resources: ['finger_1_med_joint', 'finger_1_prox_joint', 'finger_2_med_joint', 'finger_2_prox_joint', 'finger_3_med_joint']
I have tried for a while to solve this but I cannot figure how. Does anybody have any suggestion?
Thank you ,
Thibault.
************************************************************END**********************************************************************
abb_barrett_macro.xacro
transmission_interface/SimpleTransmission PositionJointInterface 1 transmission_interface/SimpleTransmission PositionJointInterface 1 transmission_interface/SimpleTransmission PositionJointInterface 1 transmission_interface/SimpleTransmission PositionJointInterface 1 transmission_interface/SimpleTransmission PositionJointInterface 1 transmission_interface/SimpleTransmission PositionJointInterface 1 Gazebo/Orange true Gazebo/Orange true Gazebo/Orange true Gazebo/Orange true Gazebo/Orange true Gazebo/Orange true Gazebo/Black true / gazebo_ros_control/DefaultRobotHWSim
barrett.xacro
transmission_interface/SimpleTransmission PositionJointInterface PositionJointInterface 1 transmission_interface/SimpleTransmission PositionJointInterface PositionJointInterface 1 transmission_interface/SimpleTransmission PositionJointInterface PositionJointInterface 1 transmission_interface/SimpleTransmission PositionJointInterface PositionJointInterface 10 transmission_interface/SimpleTransmission PositionJointInterface PositionJointInterface 1 transmission_interface/SimpleTransmission PositionJointInterface PositionJointInterface 1 transmission_interface/SimpleTransmission PositionJointInterface PositionJointInterface 1 transmission_interface/SimpleTransmission PositionJointInterface PositionJointInterface 1 Gazebo/Orange true Gazebo/Orange true true Gazebo/Black true Gazebo/Orange true Gazebo/Orange true Gazebo/Black true Gazebo/Orange true Gazebo/Black true Gazebo/Orange true 100.0 barrett_base_link barrett_palm_pose_ground_truth 0 0 0 0 0 0 0.0 world 20 40 2 finger_1_prox_link finger_2_prox_link barrett_base_link finger_1_med_joint finger_1_dist_joint 1.0 finger_2_med_joint finger_2_dist_joint 1.0 finger_3_med_joint finger_3_dist_joint 1.0 / true 100.0
abb_barrett.xacro
↧
Controller can't be found but are loaded,Moveit
↧
Suggestions for drone simulator with ROS + Gazebo
Hi there, I am looking for a decent starting point for a drone project. I've checked the TUM_SIM (http://wiki.ros.org/tum_simulator)
And it seems quite stable, nevertheless, anyone has some experience with drones and ROS? What do you recommend? And also for the motion planning, should moveit work for a task like this? Or should I look into other 3d planners?
Thanks for the tips!
↧
↧
How to use custom OGRE materials in URDF in ROS Indigo that displays in Gazebo?
Hi everyone
I want to create a custom OGRE material file, store it in my ROS Indigo package, and have my robot's visual in Gazebo use these materials.
I don't want to use SDF (I know how to; in fact, I learned SDF before URDF).
Here's what I tried and the results I got:
1. Using Gazebo's built in materials work.
Gazebo/Yellow
1. Adding materials to Gazebo's built in materials file at `/usr/share/gazebo-2.2/media/materials/scripts/gazebo.material` also works.
1. [This](https://answers.ros.org/question/33424/gazebo-own-materials-path/) didn't work. It's for ROS Fuerte and Gazebo 1, so I had to make some changes:
1. `roscreate-pkg gazebo_tutorials std_msgs rospy roscpp gazebo` failed because `ERROR: dependency [gazebo] cannot be found`. I installed through `apt-get` every package that had `gazebo` in the name, but that didn't fix it. So, instead, I replaced `gazebo` by all packages returned by `rospack list` that started with `gazebo`. Only after the package was created that I realized it was the command to generate the old package format. [This](http://ros-users.122217.n3.nabble.com/gazebo-materials-list-td984880.html) and [this](http://wiki.ros.org/simulator_gazebo/Tutorials/ListOfMaterials) pages confirm that `rospack find gazebo` used to work in the past and doesn't anymore. So I created a new package and replaced the `` tags by ``, `` and ``.
1. I tried with ` ` but, when launching the package, `Warning [Visual.cc:819] Unable to get Material[…] for Geometry[…. Object will appear white`. Then I replaced `${prefix}` by the full path to where my `….material` file was located; same result.
1. The first snippet from the answer to [this question](http://answers.gazebosim.org/question/1706/using-custom-material-for-an-object/) results in `Warning [Visual.cc:819] Unable to get Material[script] for Geometry[…. Object will appear white`. Note it says `script` instead of the material name. I tried several variations for ``'s argument.
1. [This](https://web.archive.org/web/20100621063911/http://www.ros.org/wiki/simulator_gazebo/GazeboConfiguration) confirmed a suspicion that the `….material` file must be inside a `Media` folder, so I'm testing with and without it.
1. [This](http://ros-users.122217.n3.nabble.com/New-Materials-and-Textures-in-Gazebo-td2163950.html) led me
1. [here](http://wiki.ros.org/pr2_ogre), but adding the `` tag to the launch file also didn't work.
1. and [here](http://wiki.ros.org/gazebo_worlds). There's two `….material` files and one `….urdf` file that uses one of those materials, but this file isn't used anywhere. Also, the syntax is strange. It says `b21.material `, which is the name of the file, but the materials defined there are named `b21_base_dark` and `b21_base_blue`. These names aren't used anywhere. I also tried to place my `….material` file in the full `Media/materials/scripts` path as is used by this package. `manifest.xml` only confirms to me that `"${prefix}"` is correct, but I don't know what's the impact of not having the `gazebo` package anymore.
1. I don't mind using a colored Collada file if it worked. I applied random face colors with [MeshLab](https://en.wikipedia.org/wiki/MeshLab). Mesh is still white. In RViz, it's a darker gray. Adding an `` tag as per [here](https://answers.ros.org/question/10846/can-material-colors-be-applied-to-collada-dae-meshes/) makes no difference.
Please walk me through the steps necessary to make this work.
Thanks in advance.
↧
Turtlebot Gazebo Information about pushing objects
Hello Guys,
is there a way how i can get information if my robot can push an object or he can't. I am using Gazebo 7.0 with Ros Kinetic turtlebot package.
I looked in odom but i didn´t find anything whats helps me with my problem.
Is there a topic that will help me with the problem?
Maybe with wheel movement ?
To clear the meaning of pushing : My robot drive into an object some objects he can move and some he can't. I need a parameter to decide which objects he can push away and which he can't.
I just need a clue in what direction I have to look for to solve this problem..
↧
I can't import custom 3D cad in gazebo
I used solidworks and saved in STL format. I use gazebo to import the 3D cad files, but It could not opened in gazebo. I followed the menual in the gazebo sites but it did not worked. Please help me to do solve the problem
↧
↧
can't import custom 3D cad file in gazebo
I used solidworks to make a 3d cad file. I saved with STL format. Then I followed the menual in the gazebo sites to load the custom 3D file. My gazebo version is 7.0 Please help me to solve the problem
↧
Profiling ros_controllers with Valgrind / Callgrind
Hi,
I'm trying to proifle my controllers written in the ros_control framework in Gazebo. To this end, I added the following argument in gazebo_ros/launch/empty_world.launch:
``` launch-prefix="valgrind --tool=callgrind --callgrind-out-file=/home/user/callgrind.out" ```
However, no output file is produced. Has anybody who tried profiling ROS controllers using the Valgrind/Callgrind toolchain a solution for this?
Thanks,
-Robert-
↧
Turtlebot3 navigation lost service connection when profiling with Valgrind
I followed the [guide](https://turtlebot3.readthedocs.io/en/latest/simulation.html) to tried the Turtlebot3 navigation with Gazebo simulation, and everything worked fine.
However, when I added the following argument in `turtlebot3_navigation/launch/turtlebot3_navigation.launch`, some parts seems to be broken.
``
The command
`roslaunch turtlebot3_navigation turtlebot3_navigation.launch map_file:=$HOME/map.yaml` get the following info:
... logging to /home/shaohua/.ros/log/ffe180e2-c6a1-11e7-9b70-6045cb61bc51/roslaunch-hua-14980.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
xacro: Traditional processing is deprecated. Switch to --inorder processing!
To check for compatibility of your document, use option --check-order.
For more infos, see http://wiki.ros.org/xacro#Processing_Order
started roslaunch server http://hua:34059/
SUMMARY
========
PARAMETERS
## parameters arugment ##
NODES
/
amcl (amcl/amcl)
map_server (map_server/map_server)
move_base (move_base/move_base)
robot_state_publisher (robot_state_publisher/robot_state_publisher)
ROS_MASTER_URI=http://localhost:11311
core service [/rosout] found
process[robot_state_publisher-1]: started with pid [15001]
process[map_server-2]: started with pid [15002]
process[amcl-3]: started with pid [15003]
process[move_base-4]: started with pid [15005]
==15005== Callgrind, a call-graph generating cache profiler
==15005== Copyright (C) 2002-2015, and GNU GPL'd, by Josef Weidendorfer et al.
==15005== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==15005== Command: /home/shaohua/Develope/catkin_ws/devel/lib/move_base/move_base cmd_vel:=/cmd_vel odom:=odom __name:=move_base __log:=/home/shaohua/.ros/log/ffe180e2-c6a1-11e7-9b70-6045cb61bc51/move_base-4.log
==15005==
==15005== For interactive control, run 'callgrind_control -h'.
[ INFO] [1510379496.601127874, 1017.916000000]: Using plugin "static_layer"
[ INFO] [1510379496.943013903, 1018.037000000]: Requesting the map...
[ INFO] [1510379497.199085295, 1018.493000000]: Resizing costmap to 384 X 384 at 0.050000 m/pix
[ INFO] [1510379497.342351029, 1018.626000000]: Received a 384 X 384 map at 0.050000 m/pix
[ INFO] [1510379497.547787110, 1018.655000000]: Using plugin "obstacle_layer"
[ INFO] [1510379497.587373696, 1018.692000000]: Subscribed to Topics: scan
[ INFO] [1510379498.021323315, 1019.072000000]: Using plugin "inflation_layer"
[ INFO] [1510379499.228755178, 1019.876000000]: Using plugin "obstacle_layer"
[ INFO] [1510379499.313085974, 1020.098000000]: Subscribed to Topics: scan
[ INFO] [1510379499.453659479, 1020.297000000]: Using plugin "inflation_layer"
[ WARN] [1510379499.679555905, 1020.607000000]: Costmap2DROS transform timeout. Current time: 1020.6070, global_pose stamp: 1018.4840, tolerance: 2.0000
[ INFO] [1510379499.970960188, 1020.948000000]: Created local_planner dwa_local_planner/DWAPlannerROS
[ INFO] [1510379500.056267738, 1020.979000000]: Sim period is set to 0.33
[ WARN] [1510379500.759995019, 1021.865000000]: Costmap2DROS transform timeout. Current time: 1021.8650, global_pose stamp: 1018.4840, tolerance: 2.0000
[ INFO] [1510379501.890491261, 1022.881000000]: Recovery behavior will clear layer obstacles
[ INFO] [1510379502.025401841, 1023.151000000]: Recovery behavior will clear layer obstacles
And the following is information from `roswtf`:
Loaded plugin tf.tfwtf
Package: turtlebot3_navigation
================================================================================
Static checks summary:
No errors or warnings
================================================================================
Beginning tests of your ROS graph. These may take awhile...
analyzing graph...
... done analyzing graph
running graph rules...
... done running graph rules
running tf checks, this will take a second...
... tf checks complete
Online checks summary:
Found 2 warning(s).
Warnings are things that may be just fine, but are sometimes at fault
WARNING The following node subscriptions are unconnected:
* /amcl:
* /initialpose
* /move_base:
* /move_base_simple/goal
* /move_base/cancel
* /gazebo:
* /gazebo/set_model_state
* /gazebo/set_link_state
WARNING These nodes have died:
* spawn_urdf-5
Found 2 error(s).
ERROR The following nodes should be connected but aren't:
* /move_base->/move_base (/move_base/global_costmap/footprint)
* /move_base->/move_base (/move_base/local_costmap/footprint)
ERROR Errors connecting to the following services:
* service [/move_base/DWAPlannerROS/set_parameters] appears to be malfunctioning: Unable to communicate with service [/move_base/DWAPlannerROS/set_parameters], address [rosrpc://hua:54601]
* service [/move_base/global_costmap/static_layer/set_parameters] appears to be malfunctioning: Unable to communicate with service [/move_base/global_costmap/static_layer/set_parameters], address [rosrpc://hua:54601]
* service [/move_base/local_costmap/inflation_layer/set_parameters] appears to be malfunctioning: Unable to communicate with service [/move_base/local_costmap/inflation_layer/set_parameters], address [rosrpc://hua:54601]
* service [/move_base/get_loggers] appears to be malfunctioning: Unable to communicate with service [/move_base/get_loggers], address [rosrpc://hua:54601]
* service [/move_base/NavfnROS/make_plan] appears to be malfunctioning: Unable to communicate with service [/move_base/NavfnROS/make_plan], address [rosrpc://hua:54601]
* service [/move_base/local_costmap/obstacle_layer/set_parameters] appears to be malfunctioning: Unable to communicate with service [/move_base/local_costmap/obstacle_layer/set_parameters], address [rosrpc://hua:54601]
* service [/move_base/local_costmap/set_parameters] appears to be malfunctioning: Unable to communicate with service [/move_base/local_costmap/set_parameters], address [rosrpc://hua:54601]
* service [/move_base/set_logger_level] appears to be malfunctioning: Unable to communicate with service [/move_base/set_logger_level], address [rosrpc://hua:54601]
* service [/move_base/global_costmap/obstacle_layer/set_parameters] appears to be malfunctioning: Unable to communicate with service [/move_base/global_costmap/obstacle_layer/set_parameters], address [rosrpc://hua:54601]
* service [/move_base/global_costmap/inflation_layer/set_parameters] appears to be malfunctioning: Unable to communicate with service [/move_base/global_costmap/inflation_layer/set_parameters], address [rosrpc://hua:54601]
* service [/move_base/clear_costmaps] appears to be malfunctioning: Unable to communicate with service [/move_base/clear_costmaps], address [rosrpc://hua:54601]
* service [/move_base/global_costmap/set_parameters] appears to be malfunctioning: Unable to communicate with service [/move_base/global_costmap/set_parameters], address [rosrpc://hua:54601]
* service [/move_base/make_plan] appears to be malfunctioning: Unable to communicate with service [/move_base/make_plan], address [rosrpc://hua:54601]
* service [/move_base/set_parameters] appears to be malfunctioning: Unable to communicate with service [/move_base/set_parameters], address [rosrpc://hua:54601]
It seems the navigation stack lost some service connection when work with Valgrind.
Can anyone help?
Thanks in advenced for any reply!
-ShaoHua
↧
[HELP] Problem with point cloud messages!
Hi all,
I'm struggling with this bug since two days and I'm really going crazy, so I hope that you can give me good hints on what can cause this strange behaviour.
I'm working with gazebo, where I created an apartment-like environment and a mobile robot. The robot is equipped with an RGB-D camera and a [logical_camera](http://gazebosim.org/tutorials?tut=logical_camera_sensor&cat=sensors&branch=logical_camera).
To get the "images" from the logical camera I wrote a gazebo plugin, as explained in the tutorial, and I slightly modified the message to also contain the models bounding boxes:
> void LogicalCameraPlugin::OnUpdate(){> msgs::LogicalCameraImage logical_image;> semantic_map_benchmarking::LogicalCameraImage msg;> logical_image = this->parentSensor->Image();> gazebo::rendering::ScenePtr scene = gazebo::rendering::get_scene();> if (!scene || !scene->Initialized())> return;>> msg.header.stamp = ros::Time::now();> msg.header.frame_id = "logical_camera_link";>> msg.pose.position.x = logical_image.pose().position().x();> ...>> int number_of_models = logical_image.model_size();> for(int i=0; i < number_of_models; i++){> semantic_map_benchmarking::Model model_msg;>> rendering::VisualPtr visual = scene->GetVisual(logical_image.model(i).name());> if (!visual)> continue;>> math::Box bounding_box = visual->GetBoundingBox();>> model_msg.pose.position.x = logical_image.model(i).pose().position().x();>> model_msg.size.x = bounding_box.GetXLength();> model_msg.size.y = bounding_box.GetYLength();> model_msg.size.z = bounding_box.GetZLength();>> model_msg.min.x = bounding_box.min.x;> model_msg.min.y = bounding_box.min.y;> model_msg.min.z = bounding_box.min.z;>> model_msg.max.x = bounding_box.max.x;> model_msg.max.y = bounding_box.max.y;> model_msg.max.z = bounding_box.max.z;>> msg.models.push_back(model_msg);> }>> this->image_pub.publish(msg);> }
What I want to do is the following: given the logical camera image containing the models bounding boxes and the depth camera point cloud, for each bounding box find the points of the cloud that fall inside it.
So, I implemented a node that listens to logical_camera and rgbd camera messages with message filters and approximate time synchronization, and this is what I do in the callback:
void filterCallback(const semantic_map_benchmarking::LogicalCameraImage::ConstPtr& logical_image_msg,
const PointCloud::ConstPtr& scene_cloud_msg){
tf::StampedTransform depth_camera_pose;
try {
_listener.waitForTransform("map",
"camera_depth_optical_frame",
ros::Time(0),
ros::Duration(3));
_listener.lookupTransform("map",
"camera_depth_optical_frame",
ros::Time(0),
depth_camera_pose);
}
catch(tf::TransformException ex) {
ROS_ERROR("%s", ex.what());
}
Eigen::Isometry3f depth_camera_transform = tfTransform2eigen(depth_camera_pose);
PointCloud::Ptr map_cloud (new PointCloud ());
pcl::transformPointCloud (*scene_cloud_msg, *map_cloud, depth_camera_transform);
PointCloud::Ptr objects_cloud_msg (new PointCloud ());
objects_cloud_msg->header.frame_id = "/map";
objects_cloud_msg->width = 1;
objects_cloud_msg->is_dense = false;
int num_points=0;
PointCloud::Ptr boxes_cloud_msg (new PointCloud ());
boxes_cloud_msg->header.frame_id = "/map";
boxes_cloud_msg->height = logical_image_msg->models.size()*8;
boxes_cloud_msg->width = 1;
boxes_cloud_msg->is_dense = false;
tf::StampedTransform logical_camera_pose;
tf::poseMsgToTF(logical_image_msg->pose,logical_camera_pose);
for(int i=0; i < logical_image_msg->models.size(); i++){
tf::Transform model_pose;
tf::poseMsgToTF(logical_image_msg->models.at(i).pose,model_pose);
Eigen::Vector3f box_min = tfTransform2eigen(logical_camera_pose)*tfTransform2eigen(model_pose)*
Eigen::Vector3f(logical_image_msg->models.at(i).min.x,
logical_image_msg->models.at(i).min.y,
logical_image_msg->models.at(i).min.z);
Eigen::Vector3f box_max = tfTransform2eigen(logical_camera_pose)*tfTransform2eigen(model_pose)*
Eigen::Vector3f(logical_image_msg->models.at(i).max.x,
logical_image_msg->models.at(i).max.y,
logical_image_msg->models.at(i).max.z);
float x_range = box_max.x()-box_min.x();
float y_range = box_max.y()-box_min.y();
float z_range = box_max.z()-box_min.z();
//in this way I get the 8 vertices of the bounding box
for(int k=0; k <= 1; k++)
for(int j=0; j <= 1; j++)
for(int i=0; i <= 1; i++)
boxes_cloud_msg->points.push_back (pcl::PointXYZ(box_min.x() + i*x_range,
box_min.y() + j*y_range,
box_min.z() + k*z_range));
for(int i=0; i < map_cloud->points.size(); ++i){
if(map_cloud->points[i].x > box_min.x() && map_cloud->points[i].x < box_max.x() &&
map_cloud->points[i].y > box_min.y() && map_cloud->points[i].y < box_max.y() &&
map_cloud->points[i].z > box_min.z() && map_cloud->points[i].z < box_max.z()){
objects_cloud_msg->points.push_back(map_cloud->points[i]);
num_points++;
}
}
}
objects_cloud_msg->height = num_points;
_boxes_cloud_pub.publish(boxes_cloud_msg);
_objects_cloud_pub.publish(objects_cloud_msg);
}
I'm 99% sure that the math is correct, that is, the two clouds are in the same reference frame (i.e. map). In RViz, I visualize correctly the two clouds and I can see that in the space defined by the bounding box it actually falls a certain number of points but the if statement never becomes true and objects_cloud is always empty.
I'd like to show you a screenshot of the situation but I can't because I'm posting this question from another pc, nevertheless, I kindly ask you to trust me since I made all the possible checks that came to my mind.
As in the title, still I can't understand where is the problem, so I'd be very glad if someone could give me some hint about this bug!!!
Thanks.
↧
↧
Issues with custom robot amcl in Rviz/Gazebo
Hello,
I am following a basic tutorial and I created my own robot in Gazebo and Rviz, and added laser and camera sensors to it. I then utilized a map from Clearpath to try and localize this robot using AMCL.
There are a few issues I am running across that I am unable to fix as of now.
1. The robot when I launch in RViz needs to be set to the "odom" fixed frame, however the map requires the "map" to function. If I select "odom" then the actual map in RViz shuffles about a point (jittery motion). If I select "map" then the robot seems to be jittering about. I am not entirely sure how to fix that. This doesn't happen in Gazebo so I am assuming this doesn't contribute to any errors. But any suggestions on what I am missing or understanding incorrectly?
2. As soon as I run the launch file for the amcl (which loads the map, and starts amcl node, and the move_base node with the config params), I load it up in RViz and then select "2D pose estimate" and point the arrow towards a particular path in the map from the robot. I am attaching an image below. The green circle is where the robot starts and the red arrow underneath is the "2D pose estimate I set". As you can see, as soon as I did that, the costmap depicts it as if the area is blocked off. I select the "2D Nav Goal" and set it as per the Red arrow you can see on the left side. Since as per the costmap the area in front of the robot is blocked, it decides to take the path opposite of it to try to reach the goal. I am trying to understand why this is happening and how to rectify it. Is it any specific parameter somewhere that I need to tweak or I am initializing something incorrectly?

3. After the robot decided to take the other route (much longer) I get the following result after a while (I am running this off of a virtual machine unfortunately so the robot movement is slow, can't speed that up somehow). I have marked areas similar to the image above to give an idea. The robot is now located here and is still trying to find its way around.
https://imgur.com/a/FhB61
And I get the following errors/warnings -
> [ERROR] [1510033498.355228432, 2137.605000000]: None of the points of the global plan were in the local costmap, global plan points too far from robot> [ WARN] [1510033498.369760487, 2137.609000000]: The origin for the sensor at (-0.49, -0.43) is out of map bounds. So, the costmap cannot raytrace for it.> [ WARN] [1510033500.647048940, 2138.619000000]: The origin for the sensor at (-0.49, -0.46) is out of map bounds. So, the costmap cannot raytrace for it.> [ WARN] [1510033507.102539142, 2141.625000000]: The origin for the sensor at (4.69, 0.95) is out of map bounds. So, the costmap cannot raytrace for it.> [ERROR] [1510033526.597402587, 2147.620000000]: None of the 279 first of 279 (279) points of the global plan were in the local costmap and free> [ERROR] [1510033526.597706226, 2147.620000000]: None of the points of the global plan were in the local costmap, global plan points too far from robot
And the actual position of the Robot in Gazebo doesn't match with the one shown in Rviz. The robot is still moving but the position is way off in RViz vs Gazebo.
https://imgur.com/a/X14Q3
I am trying to figure out **how to identify the problem here** and **how to go about fixing and improving it**. Would appreciate any help to learn this better. Thank you!
P.S. - There are several issues with this editor when I tried posting. Where can I report those? I couldn't upload all the images in one go. I couldn't add proper tags. I couldn't scroll in the text editor at all. Would like to report those.
↧
MoveIt and Gazebo Issue
Hi all,
Background: I am a complete newbie to Gazebo, ROS, and MoveIt. I am currently using ROS-Indigo along with Ubuntu 14.04, Gazebo, and MoveIt. This is not something that I have written myself, but I am trying out the simulation package created by Wilselby [here](https://github.com/wilselby/ROS_quadrotor_simulator).
The issue that I am having is that I do not believe that messages are being published from MoveIt to the drone within Gazebo, if I understanding it right. Which in turn, is not moving the robot/drone joints in Gazebo.
When running a rostopic echo on the related movement topics, I get the output of "WARNING: no messages received and simulated time is active. Is /clock being published".
However, when running a rostopic echo on /clock, I do get an output without any warning or error messages. I find this rather strange.
If possible, could anyone shed any insight on this. It would be greatly appreciated. Thank you!
↧
MoveIt and Gazebo Issue
Hi all,
Background: I am a complete newbie to Gazebo, ROS, and MoveIt. I am currently using ROS-Indigo along with Ubuntu 14.04, Gazebo, and MoveIt. This is not something that I have written myself, but I am trying out the simulation package created by Wilselby [here](https://github.com/wilselby/ROS_quadrotor_simulator).
The issue that I am having is that I do not believe that messages are being published from MoveIt to the drone within Gazebo, if I understanding it right. Which in turn, is not moving the robot/drone joints in Gazebo.
When running a rostopic echo on the related movement topics, I get the output of "WARNING: no messages received and simulated time is active. Is /clock being published".
However, when running a rostopic echo on /clock, I do get an output without any warning or error messages. I find this rather strange.
If possible, could anyone shed any insight on this. It would be greatly appreciated. Thank you!
↧
Cannot insert or see models even though gazebo_model_path is set
I am having issues inserting custom models into gazebo. Here is my file structure:
- lawnbot_ws
- src
- lawnbot_desription
- models
- grassplane
- meshes
- model.sdf and model.config
- package.xml
Gazebo shows: /home/josiah/PycharmProjects/lawnbot_ws/src/lawnbot_description/models in the insert tab, however it does not show a drop down for actually inserting the grassplane model!
I also have the following line inserted in the package.xml file of the lawnbot_description package:
I do not understand what is wrong. I am calling:
roslaunch gazebo_ros empty_world.launch extra_gazebo_args:="--verbose"
in the terminal and the gazebo_model_path shows:
/home/josiah/PycharmProjects/lawnbot_ws/src/lawnbot_description/models
↧
↧
Part of the robot (UR5 with robotiq gripper) not showing up in gazebo
Hi,
I'm working on a simulation combining the UR5 arm and a robotiq 2-finger gripper together. The arm shows up completely in gazebo, but the base of the gripper does not show up despite added intertial parameters. But in Rviz it shows up just fine. So I guess gazebo doesn't like something about the robotiq xacro file, but I can't find out what. Hopefully someone can help me.
I'm using ROS Indigo and Gazebo 2.2.3.
Here you can see how it looks in rviz and gazebo: https://i.imgur.com/vHwSoId.png
Sometimes that triangle shows up, but not every time: https://i.imgur.com/VPYqIdS.png
This is the xacro file containing the description for the robotiq gripper: https://github.com/philwall3/robotiq/blob/patch-1/robotiq_2f_model/model/robotiq_2f_85.urdf.xacro
And this is the top level xacro that combines the arm and gripper and that I load in gazebo:
And here is the launch file:
↧
Failed to validate trajectory: couldn't receive full current joint state within 1s error
hi!
I am learning how to work with gazebo+moveit on ros indigo. I am following the book "Mastering ROS for Robotics Programming" and i am working with seven_dof_arm. I tried to execute only moveit, planned a motion and all did well and the same happen when i only work with gazebo only and control by terminal a joint to move. My problem happens when i have the two running and somehow i cant execute my planning from moveit to gazebo, it gives always this error: "Failed to validate trajectory: couldn't receive full current joint state within 1s".
I don't known how to resolve this problem...
i have gazebo 2, ros indigo, moveit last update (from january 2017), ubuntu 14.04 trusty.
My result in the terminal when i try to plan and execute a valid state:
[ INFO] [1484581574.863269930, 60.697000000]: Planning request received for MoveGroup action. Forwarding to planning pipeline.
[ INFO] [1484581574.864123376, 60.697000000]: No optimization objective specified, defaulting to PathLengthOptimizationObjective
[ INFO] [1484581574.864214951, 60.697000000]: No planner specified. Using default.
[ INFO] [1484581574.864274631, 60.697000000]: LBKPIECE1: Attempting to use default projection.
[ INFO] [1484581574.864428301, 60.697000000]: LBKPIECE1: Attempting to use default projection.
[ INFO] [1484581574.864680354, 60.697000000]: LBKPIECE1: Attempting to use default projection.
[ INFO] [1484581574.864967007, 60.697000000]: LBKPIECE1: Starting planning with 1 states already in datastructure
[ INFO] [1484581574.865112877, 60.697000000]: LBKPIECE1: Starting planning with 1 states already in datastructure
[ INFO] [1484581574.865192578, 60.697000000]: LBKPIECE1: Attempting to use default projection.
[ INFO] [1484581574.865431756, 60.697000000]: LBKPIECE1: Starting planning with 1 states already in datastructure
[ INFO] [1484581574.865522202, 60.697000000]: LBKPIECE1: Attempting to use default projection.
[ INFO] [1484581574.865631368, 60.697000000]: LBKPIECE1: Starting planning with 1 states already in datastructure
[ INFO] [1484581575.092653727, 60.870000000]: LBKPIECE1: Created 132 (30 start + 102 goal) states in 116 cells (28 start (28 on boundary) + 88 goal (88 on boundary))
[ INFO] [1484581575.096303094, 60.873000000]: LBKPIECE1: Created 90 (53 start + 37 goal) states in 77 cells (51 start (51 on boundary) + 26 goal (26 on boundary))
[ INFO] [1484581575.099875817, 60.876000000]: LBKPIECE1: Created 93 (39 start + 54 goal) states in 78 cells (38 start (38 on boundary) + 40 goal (40 on boundary))
[ INFO] [1484581575.148138305, 60.908000000]: LBKPIECE1: Created 152 (47 start + 105 goal) states in 137 cells (46 start (46 on boundary) + 91 goal (91 on boundary))
[ INFO] [1484581575.219947981, 60.970000000]: ParallelPlan::solve(): Solution found by one or more threads in 0.355519 seconds
[ INFO] [1484581575.220561589, 60.970000000]: LBKPIECE1: Attempting to use default projection.
[ INFO] [1484581575.220679319, 60.971000000]: LBKPIECE1: Attempting to use default projection.
[ INFO] [1484581575.220783265, 60.971000000]: LBKPIECE1: Starting planning with 1 states already in datastructure
[ INFO] [1484581575.220883439, 60.971000000]: LBKPIECE1: Starting planning with 1 states already in datastructure
[ INFO] [1484581575.222415665, 60.971000000]: LBKPIECE1: Attempting to use default projection.
[ INFO] [1484581575.222642371, 60.971000000]: LBKPIECE1: Starting planning with 1 states already in datastructure
[ INFO] [1484581575.225482043, 60.975000000]: LBKPIECE1: Attempting to use default projection.
[ INFO] [1484581575.225660210, 60.975000000]: LBKPIECE1: Starting planning with 1 states already in datastructure
[ INFO] [1484581575.271342086, 60.995000000]: LBKPIECE1: Created 55 (18 start + 37 goal) states in 43 cells (18 start (18 on boundary) + 25 goal (25 on boundary))
[ INFO] [1484581575.376397773, 61.029000000]: LBKPIECE1: Created 129 (46 start + 83 goal) states in 114 cells (45 start (45 on boundary) + 69 goal (69 on boundary))
[ INFO] [1484581575.379188044, 61.029000000]: LBKPIECE1: Created 244 (142 start + 102 goal) states in 221 cells (132 start (132 on boundary) + 89 goal (89 on boundary))
[ INFO] [1484581575.396009612, 61.039000000]: LBKPIECE1: Created 154 (55 start + 99 goal) states in 140 cells (53 start (53 on boundary) + 87 goal (87 on boundary))
[ INFO] [1484581575.865887723, 61.440000000]: ParallelPlan::solve(): Solution found by one or more threads in 0.645353 seconds
[ INFO] [1484581575.866652837, 61.441000000]: LBKPIECE1: Attempting to use default projection.
[ INFO] [1484581575.866837889, 61.441000000]: LBKPIECE1: Starting planning with 1 states already in datastructure
[ INFO] [1484581575.867170960, 61.441000000]: LBKPIECE1: Attempting to use default projection.
[ INFO] [1484581575.867379753, 61.441000000]: LBKPIECE1: Starting planning with 1 states already in datastructure
[ INFO] [1484581575.958625159, 61.503000000]: LBKPIECE1: Created 126 (73 start + 53 goal) states in 113 cells (70 start (70 on boundary) + 43 goal (43 on boundary))
[ INFO] [1484581575.965867380, 61.509000000]: LBKPIECE1: Created 126 (60 start + 66 goal) states in 114 cells (58 start (58 on boundary) + 56 goal (56 on boundary))
[ INFO] [1484581576.509494547, 61.929000000]: ParallelPlan::solve(): Solution found by one or more threads in 0.642884 seconds
[ INFO] [1484581576.510056518, 61.929000000]: SimpleSetup: Path simplification took 0.000456 seconds and changed from 7 to 2 states
[ INFO] [1484581577.430458282, 62.637000000]: Received new trajectory execution service request...
[ WARN] [1484581578.900054544, 63.644000000]: Failed to validate trajectory: couldn't receive full current joint state within 1s
[ INFO] [1484581578.900165733, 63.644000000]: Execution completed: ABORTED
↧
Display MoveIt Collison Objects in Gazebo
How can i display collision objects i added to my MoveIt planning scene in Gazebo?
I added them like:
# publish a demo scene
scene = PlanningSceneInterface()
p = PoseStamped()
p.header.frame_id = robot.get_planning_frame()
# add a box
p.pose.position.x = 0.7
p.pose.position.y = -0.08
p.pose.position.z = 0.1
scene.add_box("box", p, (0.15, 0.15, 0.15))
They are all diplayed well in MoveIt but not in Gazebo right now. The robot is displayed in gazebo as well. Im running ROS Indigo on Ubuntu 14.04.
Thanks for your support!
↧
Does SDF format not working with ROS ?
Hello
I m at the beginning of simulation a robot. So Before start I made some research for start point. The biggest contradiction that I face up is: Should I start my design with SDF of URFD format. ( I want to use my design in Gazebo, rviz and ROS )
As I read from this [article]( http://gazebosim.org/tutorials?tut=ros_urdf) : SDF is a complete description for everything from the world level down to the robot level. And it has also some more advantages like easy adding and modify elements.
As I read from this [article](https://autonomousbot.wordpress.com/2015/01/21/urdf-vs-sdf/) : it is described that difference
between SDF & URFD is ; URDF works with the rest of the Robot Operating System (ROS) and SDF really only works with Gazebo.
So again the question on that point :
-Does ROS not support the SDF format ?
Thanks
↧
↧
Dynamically shape included models in gazebo
Hello everyone,
I'm working on a university project in which I have to create a simulated environment with gazebo and spawn a robot in there (I will have to move the robot in a further project).
In order to do something more elaborated, I thought about creating a maze in which the wall corners are not necessarily perpendicular.
To so, my plan is to create a model file - in which there are a main wall, a rotating wall and a central block that fills the corner between them - and include it many times into the world file changing dynamically some parameters so that the angle between the two walls and the central block will change accordingly.
Is it possible? How can I do it?
I'm not necessarily asking the whole process, some hints on how to proceed are fine.
Thank you!
↧
which topic should I pub to move robot in rviz and Gazebo?
Hi all. I'm trying to write some rviz plugin attached to a 6 dof robot which are designed to control the 6 individual axis seperately. So I need to know which topic do the Rviz and Gazebo listen to. I run `rostopic list` to find all the topic and here are the output:
/attached_collision_object
/clock
/collision_object
/execute_trajectory/cancel
/execute_trajectory/feedback
/execute_trajectory/goal
/execute_trajectory/result
/execute_trajectory/status
/gazebo/link_states
/gazebo/model_states
/gazebo/parameter_descriptions
/gazebo/parameter_updates
/gazebo/set_link_state
/gazebo/set_model_state
/jakaUr/jaka_joint_controller/command
/jakaUr/jaka_joint_controller/follow_joint_trajectory/cancel
/jakaUr/jaka_joint_controller/follow_joint_trajectory/feedback
/jakaUr/jaka_joint_controller/follow_joint_trajectory/goal
/jakaUr/jaka_joint_controller/follow_joint_trajectory/result
/jakaUr/jaka_joint_controller/follow_joint_trajectory/status
/jakaUr/jaka_joint_controller/state
/jakaUr/joint_states
/joint_states
/move_group/cancel
/move_group/display_contacts
/move_group/display_planned_path
/move_group/feedback
/move_group/goal
/move_group/monitored_planning_scene
/move_group/ompl/parameter_descriptions
/move_group/ompl/parameter_updates
/move_group/plan_execution/parameter_descriptions
/move_group/plan_execution/parameter_updates
/move_group/planning_scene_monitor/parameter_descriptions
/move_group/planning_scene_monitor/parameter_updates
/move_group/result
/move_group/sense_for_plan/parameter_descriptions
/move_group/sense_for_plan/parameter_updates
/move_group/status
/move_group/trajectory_execution/parameter_descriptions
/move_group/trajectory_execution/parameter_updates
/pickup/cancel
/pickup/feedback
/pickup/goal
/pickup/result
/pickup/status
/place/cancel
/place/feedback
/place/goal
/place/result
/place/status
/planning_scene
/planning_scene_world
/recognized_object_array
/rosout
/rosout_agg
/rviz_moveit_motion_planning_display/robot_interaction_interactive_marker_topic/feedback
/rviz_moveit_motion_planning_display/robot_interaction_interactive_marker_topic/update
/rviz_moveit_motion_planning_display/robot_interaction_interactive_marker_topic/update_full
/rviz_shantengfei_pc_28509_8920340868071791588/motionplanning_planning_scene_monitor/parameter_descriptions
/rviz_shantengfei_pc_28509_8920340868071791588/motionplanning_planning_scene_monitor/parameter_updates
/tf
/tf_static
/trajectory_execution_event
and run `rosrun rqt_graph rqt_graph` to find the connection of whole package.the picture is the output.
I tried to publish some topic but I found it was hard to publish data mannually in some topic like `/jakaUr/jaka_joint_controller/follow_joint_trajectory/goal`. Could someone tell me how to find the correct topic that I can publish to control robot in Rviz and Gazebo move that I can wirte mannual control Rviz plugin? Thanks!
↧
How to understand data from the image_raw/compressed topic?
I wanted to know what they represent and how to read data from the image_raw / compressed topic. For example, the laser / scan topic, your "ranges" data represent the distance to an object, so the image_raw / compressed topic represents exactly what? How can I use them?
Here is an example of the topic:
header:
seq: 2068
stamp:
secs: 689
nsecs: 786000000
frame_id: camera_link
format: rgb8; jpeg compressed bgr8
data: [255, 216, 255, 224, 0, 16, 74, 70, 73, 70, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 255, 219, 0, 67, 0, 6, 4, 5, 6, 5, 4, 6, 6, 5, 6, 7, 7, 6, 8, 10, 16, 10, 10, 9, 9, 10, 20, 14, 15, 12, 16, 23, 20, 24, 24, 23, 20, 22, 22, 26, 29, 37, 31, 26, 27, 35, 28, 22, 22, 32, 44, 32, 35, 38, 39, 41, 42, 41, 25, 31, 45, 48, 45, 40, 48, 37, 40, 41, 40, 255, 219, 0, 67, 1, 7, 7, 7, 10, 8, 10, 19, 10, 10, 19, 40, 26, 22, 26, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 255, 192, 0, 17, 8, 3, 32, 3, 32, 3, 1, 34, 0, 2, 17, 1, 3, 17, 1, 255, 196, 0, 31, 0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 255, 196, 0, 181, 16, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 125, 1, 2, 3, 0, 4, 17, 5, 18, 33, 49, 65, 6, 19, 81, 97, 7, 34, 113, 20, 50, 129, 145, 161, 8, 35, 66, 177, 193, 21, 82, 209, 240, 36, 51, 98, 114, 130, 9, 10, 22, 23, 24, 25, 26, 37, 38, 39, 40, 41, 42, 52, 53, 54, 55, 56, 57, 58, 67, 68, 69, 70, 71, 72, 73, 74, 83, 84, 85, 86, 87, 88, 89, 90, 99, 100, 101, 102, 103, 104, 105, 106, 115, 116, 117, 118, 119, 120, 121, 122, 131, 132, 133, 134, 135, 136, 137, 138, 146, 147, 148, 149, 150, 151, 152, 153, 154, 162, 163, 164, 165, 166, 167, 168, 169, 170, 178, 179, 180, 181, 182, 183, 184, 185...
↧