Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all 1516 articles
Browse latest View live

move robot in rviz and gazebo

$
0
0
hello, i want to tell a roboter where to move to in rviz (with the 2D Nav Goal) and simulate that in gazebo. does that work? and if yes, how? thanks in advance ps.: sry for the noobie-question, but i really don't what to do.

add AR tag in gazebo

$
0
0
Hello everyone, I'm wondering how to add an `AR tag` in the gazebo's world these days. But I have not found the right way to solve this problem. Or could I add an image to the world? Thanks first!

Failed to validate trajectory after updating moveit (Feb 2017)

$
0
0
Hello! I am very new to ROS and i'm currently working on gazebo and moveit on ros indigo. I am currently using the "Autonomous-Flight-ROS" code written by AlessioTonioni. Before updating moveit, everything works well. After updating, I have no problem planning a motion but the problem happens when i execute my planning from moveit to gazebo, it gives the error: "Failed to validate trajectory: couldn't receive full current joint state within 1s". I'm currently using ros indigo, gazebo 2.2.6, moveit last update (Feb 2017), ubuntu 14.04 trusty. In the terminal, when i try to plan and execute a valid state, it shows [ INFO] [1487385467.586393924, 55.384000000]: Planning request received for MoveGroup action. Forwarding to planning pipeline. [ INFO] [1487385467.632584405, 55.416000000]: No optimization objective specified, defaulting to PathLengthOptimizationObjective [ INFO] [1487385467.633476818, 55.417000000]: Planner configuration 'Quadrotore[PRMstarkConfigDefault]' will use planner 'geometric::PRMstar'. Additional configuration parameters will be set when the planner is constructed. [ INFO] [1487385467.648647637, 55.427000000]: Quadrotore[PRMstarkConfigDefault]: problem definition is not set, deferring setup completion... [ INFO] [1487385467.648978360, 55.427000000]: Quadrotore[PRMstarkConfigDefault]: problem definition is not set, deferring setup completion... [ INFO] [1487385467.649068794, 55.427000000]: Quadrotore[PRMstarkConfigDefault]: problem definition is not set, deferring setup completion... [ INFO] [1487385467.649106579, 55.427000000]: Quadrotore[PRMstarkConfigDefault]: problem definition is not set, deferring setup completion... [ INFO] [1487385467.649145390, 55.427000000]: Quadrotore[PRMstarkConfigDefault]: problem definition is not set, deferring setup completion... [ INFO] [1487385467.651254216, 55.428000000]: Quadrotore[PRMstarkConfigDefault]: Starting planning with 2 states already in datastructure [ INFO] [1487385467.652344408, 55.428000000]: Quadrotore[PRMstarkConfigDefault]: Starting planning with 2 states already in datastructure [ INFO] [1487385467.653093549, 55.429000000]: Quadrotore[PRMstarkConfigDefault]: Starting planning with 2 states already in datastructure [ INFO] [1487385467.659354421, 55.432000000]: Quadrotore[PRMstarkConfigDefault]: Starting planning with 2 states already in datastructure [ INFO] [1487385472.650616281, 58.683000000]: Quadrotore[PRMstarkConfigDefault]: Created 1391 states [ INFO] [1487385472.650772184, 58.684000000]: Quadrotore[PRMstarkConfigDefault]: Created 1274 states [ INFO] [1487385472.650862388, 58.684000000]: Quadrotore[PRMstarkConfigDefault]: Created 1524 states [ INFO] [1487385472.651784028, 58.685000000]: Quadrotore[PRMstarkConfigDefault]: Created 1402 states [ INFO] [1487385472.652006827, 58.685000000]: ProblemDefinition: Adding approximate solution from planner PathHybridization [ INFO] [1487385472.652064502, 58.685000000]: ParallelPlan::solve(): Solution found by one or more threads in 5.002876 seconds [ INFO] [1487385475.181260991, 60.603000000]: Received new trajectory execution service request... [ WARN] [1487385476.487933898, 61.609000000]: Failed to validate trajectory: couldn't receive full current joint state within 1s [ INFO] [1487385476.488162318, 61.609000000]: Execution completed: ABORTED The rqt_graph is attached below [rosgraph.png](/upfiles/14873856542107714.png) I will be grateful if someone could help me on this problem. Thanks..

How to give Octomap data to the Planning Scene? (MoveIt!)

$
0
0
Hello, I'm relatively new to MoveIt and ROS. For the past week, I have been trying to configure the 3D sensor (a Kinect) on my robot model to work in MoveIt!, following the tutorial [here](http://docs.ros.org/kinetic/api/moveit_tutorials/html/doc/pr2_tutorials/planning/src/doc/perception_configuration.html). Additionally, I created a node to launch the Octomap Server. However, after completing these steps and firing up MoveIt!/Rviz with Gazebo, the Planning Scene doesn't contain any 3D data. I have checked the topics list, and my simulated robot is publishing the correct PointCloud2 data, and the Octomap server is running and publishing correct occupancy maps. What else is needed to get Octomap to publish the data to the Planning Scene? Code: config/sensors_kinect.yaml sensors: - sensor_plugin: occupancy_map_monitor/PointCloudOctomapUpdater point_cloud_topic: /kinect/depth/points max_range: 5.0 point_subsample: 1 padding_offset: 0.1 padding_scale: 1.0 filtered_cloud_topic: filtered_cloud launch/sensor_manager.launch.xml

Simulating a rotated Phidgets IMU

$
0
0
Summary: I have a Phidgets IMU, using the Madgwick filter, mounted rotated in 2 dimensions on the robot frame. I use the orientation from /imu/data and knowledge of the rotated mount to produce a good transform from odom => base_link. This all works fine. However, I'm struggling to figure out how to use one of the built-in IMU simulations in Gazebo to simulate this setup. There's an "rpyoffset" field, but the multiplication order looks wrong to me. Has anybody had luck simulating rotated IMUs in Gazebo? Thanks in advance. Details below: URDF: true10imu/dataimu_link10.00.00 0 00 0 0imu_link0 0 0 0 0 0 Robot setup: nh_priv_.param("simulation", simulation_, true); if (simulation_) { // Hack -- can't simulate a rotated IMU imu_transform_ = tf2::Quaternion::getIdentity(); } else { tf2::Quaternion imu_orientation; imu_orientation.setRPY(-M_PI/2, -M_PI/2, 0); imu_transform_ = imu_orientation.inverse(); } Robot /imu/data callback: void Robot::imuCallback(const sensor_msgs::ImuConstPtr &msg) { tf2::Quaternion imu_orientation; tf2::fromMsg(msg->orientation, imu_orientation); base_orientation_ = imu_orientation * imu_transform_; } Odom publisher: void Robot::publishOdom() { geometry_msgs::TransformStamped odom_tf; odom_tf.header.stamp = ros::Time::now(); odom_tf.header.frame_id = "odom"; odom_tf.child_frame_id = "base_link"; odom_tf.transform.translation.x = 0; // TODO odom_tf.transform.translation.y = 0; // TODO odom_tf.transform.translation.z = 0; // TODO odom_tf.transform.rotation = tf2::toMsg(base_orientation_); tf_broadcaster_.sendTransform(odom_tf); } [Here's the code from Gazebo ROS IMU Sensor](https://github.com/ros-simulation/gazebo_ros_pkgs/blob/e9d5506933ff2f158fd145edd4d7e6a24ba769f9/gazebo_plugins/src/gazebo_ros_imu_sensor.cpp#L76) -- note the multiplication order (offset * reading, not reading * offset).

How to get a perfect yaw angle on Gazebo?

$
0
0
I need to do georeferencing with point clouds on Gazebo so I use navsat_transform_node to convert gps to odom information as odometry/gps and I use ekf localization with "odometry/gps" and "imu/data" nodes as I am inspired by [https://answers.ros.org/question/200071/how-to-fuse-imu-gps-using-robot_localization/] but the yaw angle that I take from "odometry/filtered" node drifts even though I set all the drift and noise values to zero in husky.gazebo.xacro file. Can you tell me what should I do to get a perfect yaw angle on Gazebo or what am I doing wrong?

Error while implementing prismatic joint

$
0
0
Hi,I tried to simulate prismatic joint in Gazebo and getting following error while implementing. Could not find resource 'prismatic_joint' in 'hardware_interface::EffortJointInterface' Here is the code transmission_interface/SimpleTransmissionEffortJointInterfaceEffortJointInterface1

Drone/Quadrotor simulation

$
0
0
I would like to develop a drone model of my own in simulation(Gazebo) for testing a few of my research ideas. Can someone outline stepwise the basic requirements to accomplish this? The drone would have a kinect sensor with cameras and be capable of autonomous navigation

Gazebo, camera 3d point to pixel

$
0
0
Hi guy's, I have implemented a gazebo model with a stereo camera plugin. I have got a seconde model that I would like to mark in the left image of the stereo camera. I use tf to transform the zero point from the second model to the left camera coordinate system. With [project3dToPixel](http://docs.ros.org/api/image_geometry/html/c++/classimage__geometry_1_1PinholeCameraModel.html#a30b3761aadfa4b91c7fedb97442c2f13) from image geometry::PinholeCameraModel I convert the 3d coordinats to the pixel coordinats. The problem; they don't realy match. The trend is correct, if i move the second model to the left the marker also goes to the left. I have also performed a camera calibration to rule out possible errors in the projection matrix. Have you tried the same thing before? What am I doing wrong? Are there other solutions? Here is a part of the code: cloud_model.points.push_back(pcl::PointXYZ(0,0,0)); listener.waitForTransform("/left_camera_optical_frame", "/model2", t1, ros::Duration(0.5)); pcl_ros::transformPointCloud("/left_camera_optical_frame", cloud_model, cloud_model_trans, listener) .... { boost::mutex::scoped_lock lock(mutex_); point = pinholeCameraModel_.project3dToPixel(cv::Point3d(cloud_model_trans[0].x,cloud_model_trans[0].y,cloud_model_trans[0].z)); } left_top.x = (point.x+2); left_top.y = (point.y+2); right_bot.x = (point.x); right_bot.y = (point.y); cv::Mat m_mat= cv_bridge::toCvShare(msg, "bgr8")->image; cv::rectangle(m_mat, left_top, right_bot, cv::Scalar(255, 0, 0), 2, 8); in the camerainfo callback I initialize the pinholeCameraModel_ boost::mutex::scoped_lock lock(mutex_); pinholeCameraModel_.fromCameraInfo(msg)

what is a best way to do trajectory planning for robot arm in ROS?

$
0
0
Robot arm with 5 degree of freedom Objective: PTP motion LIN motion (Interpolation method) Implement forward and inverse kinematics 1. Creating URDF and using MOVEIT and RVIZ. 2. or with GAZEBO. which one is better? -or- are there any other efficient methods particularly for robotic arm 'trajectory planning'?

Turtlebot gazebo ( Problem with angels)

$
0
0
Hello Guys, I use Ros kinetic and Gazebo 7.0. So i know that the yaw angle that i give to gazebo is in radians that should be fine. But my question now is how can i get the angle i have set in the simulator as information in a topic. As example i set the yaw angle 3.141592 approx Pi so i get a rotation around 180 degree. Now i looked in the mobile base orientation i got a value around 0.998959. I looked in the imu data also i got the same value. What kind of physical unit is this ? I need this to rotate my robot in a specific angle.

which topic should I pub to move robot in rviz and Gazebo?

$
0
0
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.![image description](/upfiles/15111904422446539.jpeg) 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!

upgrade to gazebo 7.8

$
0
0
Hi I am currently running ROS kinetic with gazebo 7.0.0. But I am having some issues with gazebo specifically, [this](http://answers.ros.org/question/276241/turtlebot-sim-crashes-on-subscribing-to-any-topic/) . These bugs apparently can be resolved by updating the gazebo version to 7.8. Is there a way to do this?

Driving to a Point using Twist with Turtlebot

$
0
0
Hello Guys, i want to drive to a point with my Turtlebot. I used the following tutorial to try this: [Move to specific point](https://www.youtube.com/watch?time_continue=259&v=eJ4QPrYqMlw) I got no error in the code but my robot don't drive anywhere. I am starting my turtlebot project with: roslaunch turtlebot_gazebo turtlebot_world.launch Do i need any further settings to make that i can control the robot with the steps explaining in the tutorial? Here is the code i tried to use to drive my turtlebot: #! /usr/bin/env python import rospy from nav_msgs.msg import Odometry from tf.transformations import euler_from_quaternion from geometry_msgs.msg import Point, Twist from math import atan2 x = 0.0 y= 0.0 theta = 0.0 def newOdom(msg): global x global y global theta x = msg.pose.pose.position.x y = msg.pose.pose.position.y rot_q = msg.pose.pose.orientation (roll,pitch,theta) = euler_from_quaternion ([rot_q.x,rot_q.y,rot_q.z,rot_q.w]) rospy.init_node("speed_controller") sub = rospy.Subscriber("/odom",Odometry,newOdom) pub = rospy.Publisher("/cmd_vel",Twist,queue_size=1) speed = Twist() r = rospy.Rate(4) goal = Point() goal.x = -5 goal.y = -5 while not rospy.is_shutdown(): inc_x = goal.x - x inc_y = goal.y - y angle_to_goal = atan2(inc_y,inc_x) if abs(angle_to_goal - theta) > 0.1: speed.linear.x = 0.0 speed.angular.z = 0.2 else: speed.linear.x = 0.5 speed.angular.z = 0.0 pub.publish(speed) r.sleep() After this i open my turtlebot project with command above and i tried to launch the new python file with: python mycontroller.py Any tipps why nothing happend?

Turtlebot driving to specifiy point with Twist

$
0
0
Hello guys, first of all i must excuse i messed up by posting this question wrong and it got to confusing so i delete it and post it correct again. A special excuse to jayess i messed up with copying my code correct he is fully right that at this point: if abs(angle_to_goal - theta) > 0.1: speed.linear.x = 0.0 speed.angular.z = 0.1 Here needs to be bigger then 0.1 before here stands less... So my question is how i can drive with my Turtlebot to a specific point or an array of points i give the robot. i tried this code: #! /usr/bin/env python import rospy from nav_msgs.msg import Odometry from tf.transformations import euler_from_quaternion from geometry_msgs.msg import Point, Twist from math import atan2 x = 0.0 y= 0.0 theta = 0.0 def newOdom(msg): global x global y global theta x = msg.pose.pose.position.x y = msg.pose.pose.position.y rot_q = msg.pose.pose.orientation (roll,pitch,theta) = euler_from_quaternion ([rot_q.x,rot_q.y,rot_q.z,rot_q.w]) rospy.init_node("speed_controller") sub = rospy.Subscriber("/odom",Odometry,newOdom) pub = rospy.Publisher('cmd_vel_mux/input/navi', Twist, queue_size=1) speed = Twist() r = rospy.Rate(4) goal = Point() goal.x = 2 goal.y = 2 while not rospy.is_shutdown(): inc_x = goal.x - x inc_y = goal.y - y angle_to_goal = atan2(inc_y,inc_x) if abs(angle_to_goal - theta) > 0.1: speed.linear.x = 0.0 speed.angular.z = 0.1 else: speed.linear.x = 0.5 speed.angular.z = 0.0 pub.publish(speed) r.sleep() So the program works for a few rotations but the turtlebot don´t reach the correct angle he drives most time before he reachs the correct angle and lands left of the target point. I used this tutorial : [tutorial to drive to specific point with twist](https://www.youtube.com/watch?time_continue=259&v=eJ4QPrYqMlw) He used same controller and the robot drives perfectly as he should... Only difference i use a turtlebot for it

How to simulate an octomap file (.ot) in gazebo?

$
0
0
Hi all: I have a map defined by an Octomap file (.ot extension) wich I can visualize properly in rviz using octomap_server. However, I couldn't find an easy way to import this map into gazebo in order to simulate collisions and camera vision. So far, I have tried to write some code which creates a .world file from the occupied cells, but after trying to load it in Gazebo it seems to freeze the simulator at the beginning and the general performance is awful. Thank you in advance.

diff_drive_controller loading error

$
0
0
I'm trying to load the diff_drive_controller but for some unknown to me reason it fails. I run Gazebo first: **roslaunch ros_robotics rrbot_gazebo.launch** Then I run roscontrol: **roslaunch ros_robotics rrbot_control.launch** When roscontrol is loading I get the following errors in roscontrol command tab: [ERROR] [1515242737.646534, 28.579000]: Failed to load Differential_drive_wheels_controller Gazebo command tab: [ INFO] [1515242404.969943388, 257.990000000]: Controller state will be published at 50Hz. [ INFO] [1515242404.971543327, 257.990000000]: Wheel separation will be multiplied by 1. [ INFO] [1515242404.972525734, 257.991000000]: Wheel radius will be multiplied by 1. [ INFO] [1515242404.973434427, 257.992000000]: Velocity rolling window size of 10. [ INFO] [1515242404.974404622, 257.993000000]: Velocity commands will be considered old if they are older than 0.5s. [ INFO] [1515242404.975184540, 257.993000000]: Allow mutiple cmd_vel publishers is enabled [ INFO] [1515242404.976052109, 257.994000000]: Base frame_id set to base_link [ INFO] [1515242404.979266852, 257.995000000]: Odometry frame_id set to odom [ INFO] [1515242404.980146401, 257.996000000]: Publishing to tf is enabled [ERROR] [1515242404.995002625, 258.004000000]: Robot descripion couldn't be retrieved from param server. [ERROR] [1515242404.995072493, 258.004000000]: Failed to initialize the controller [ERROR] [1515242404.995109210, 258.004000000]: Initializing controller 'Differential_drive_wheels_controller' failed This is how my rrobot_control.yaml file looks like: rrbot: # Publish all joint states ----------------------------------- joint_state_controller: type: joint_state_controller/JointStateController publish_rate: 50 # Position Controllers for Robot Arm--------------------------------------- joint_base_mid_position_controller: type: effort_controllers/JointPositionController joint: joint_base_mid pid: {p: 100.0, i: 0.01, d: 10.0} joint_mid_top_position_controller: type: effort_controllers/JointPositionController joint: joint_mid_top pid: {p: 100.0, i: 0.01, d: 10.0} left_gripper_joint_position_controller: type: effort_controllers/JointPositionController joint: left_gripper_joint pid: {p: 1.0, i: 0.00, d: 0.0} right_gripper_joint_position_controller: type: effort_controllers/JointPositionController joint: right_gripper_joint pid: {p: 1.0, i: 0.00, d: 0.0} turret_joint_position_controller: type: effort_controllers/JointPositionController joint: joint_turret pid: {p: 1.0, i: 0.00, d: 0.0} # Differential Drive Controller Differential_drive_wheels_controller: type: "diff_drive_controller/DiffDriveController" left_wheel: ['joint_left_front_wheel', 'joint_left_back_wheel'] right_wheel: ['joint_right_front_wheel', 'joint_right_back_wheel'] publish_rate: 50 pose_covariance_diagonal: [0.001, 0.001, 1000000.0, 1000000.0, 1000000.0, 0.03] twist_covariance_diagonal: [0.001, 0.001, 0.001, 1000000.0, 1000000.0, 0.03] cmd_vel_timeout: 0.25 # Odometry fused with IMU is published by robot_localization, so # no need to publish a TF based on encoders alone. enable_odom_tf: false # Wheel separation and radius multipliers wheel_separation_multiplier: 1.5 # default: 1.0 wheel_radius_multiplier : 1.0 # default: 1.0 # Velocity and acceleration limits # Whenever a min_* is unspecified, default to -max_* linear: x: has_velocity_limits : true max_velocity : 2.0 # m/s has_acceleration_limits: true max_acceleration : 20.0 # m/s^2 angular: z: has_velocity_limits : true max_velocity : 4.0 # rad/s has_acceleration_limits: true max_acceleration : 25.0 # rad/s^2 ***Update I'm not sure what exactly the robot_description means but if possible please elaborate. What I have is a the following rrbot_control.launch file: And the transmissions from the urdf file: transmission_interface/SimpleTransmissionhardware_interface/VelocityJointInterface1transmission_interface/SimpleTransmissionhardware_interface/VelocityJointInterface1transmission_interface/SimpleTransmissionhardware_interface/VelocityJointInterface1transmission_interface/SimpleTransmissionhardware_interface/VelocityJointInterface1

Incorrect opening a urdf file in Gazebo

$
0
0
Hi everyone. I created a .URDF from SolidWorks using SW2URDF plugin. This urdf file that I created, opens in rviz smoothly, however this urdf file opens in the gazebo incorrectly and the model file has missing links and joints. moving joints have linkage and linkage joints(eg: wheel) but none for fixed joints(eg: lidar,realsense ..). **HOW CAN I SOLVE THE PROBLEM?** The first time I run the file gazebo.Launch is the model gazebo image(wrong): https://github.com/zafersn/ros_file_all/blob/master/image/1.jpg ![image description](/upfiles/15153239992875066.jpg) the image that appears when I reload the model after pressing the stop button on the lower toolbar: https://github.com/zafersn/ros_file_all/blob/master/image/1-1.jpg ![image description](/upfiles/15153240343835814.jpg) (model reload command: rosrun gazebo_ros spawn_model -file `rospack find car_design_full`/urdf/car_design_full.urdf -urdf -z 0.1 -model my_object) but the same mistakes still continue ( the model file has missing links and joints.) Gazebo errors that occur when I edit the model file:
https://github.com/zafersn/ros_file_all/blob/master/image/1-2.png ![image description](/upfiles/15153240472202281.png) log file: /home/ubuntu/.ros/log/952cd6c8-f367-11e7-a297-448a5bed66ea/spawn_urdf-4*.log: [rospy.client][INFO] 2018-01-07 08:49:06,802: init_node, name[/spawn_urdf], pid[7183] [xmlrpc][INFO] 2018-01-07 08:49:06,803: XML-RPC server binding to 0.0.0.0:0 [xmlrpc][INFO] 2018-01-07 08:49:06,803: Started XML-RPC server [http://192.168.1.38:45182/] [rospy.init][INFO] 2018-01-07 08:49:06,803: ROS Slave URI: [http://192.168.1.38:45182/] [rospy.impl.masterslave][INFO] 2018-01-07 08:49:06,803: _ready: http://192.168.1.38:45182/ [xmlrpc][INFO] 2018-01-07 08:49:06,804: xml rpc node: starting XML-RPC server [rospy.registration][INFO] 2018-01-07 08:49:06,804: Registering with master node http://192.168.1.38:11311 [rospy.init][INFO] 2018-01-07 08:49:06,903: registered with master [rospy.rosout][INFO] 2018-01-07 08:49:06,904: initializing /rosout core topic [rospy.rosout][INFO] 2018-01-07 08:49:06,905: connected to core topic /rosout [rospy.simtime][INFO] 2018-01-07 08:49:06,906: initializing /clock core topic [rospy.simtime][INFO] 2018-01-07 08:49:06,907: connected to core topic /clock [rosout][INFO] 2018-01-07 08:49:06,909: Loading model xml from file [rosout][INFO] 2018-01-07 08:49:06,910: Waiting for service /gazebo/spawn_urdf_model [rospy.internal][INFO] 2018-01-07 08:49:07,177: topic[/rosout] adding connection to [/rosout], count 0 [rospy.internal][INFO] 2018-01-07 08:49:08,982: topic[/clock] adding connection to [http://192.168.1.38:34827/], count 0 [rosout][INFO] 2018-01-07 08:49:09,020: Calling service /gazebo/spawn_urdf_model [rosout][INFO] 2018-01-07 08:49:09,327: Spawn status: SpawnModel: Successfully spawned model [rospy.core][INFO] 2018-01-07 08:49:09,327: signal_shutdown [atexit] [rospy.internal][INFO] 2018-01-07 08:49:09,329: topic[/rosout] removing connection to /rosout [rospy.internal][INFO] 2018-01-07 08:49:09,329: topic[/clock] removing connection to http://192.168.1.38:34827/ [rospy.impl.masterslave][INFO] 2018-01-07 08:49:09,330: atexit [rospy.internal][WARNING] 2018-01-07 08:49:09,332: Unknown error initiating TCP/IP socket to 192.168.1.38:39439 (http://192.168.1.38:34827/): Traceback (most recent call last): File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/impl/tcpros_base.py", line 558, in connect self.local_endpoint = self.socket.getsockname() AttributeError: 'NoneType' object has no attribute 'getsockname car_design_full.urdf file: Gazebo launch file: gazebo.launch:

catkin_make doesn't find all the targets

$
0
0
When I run catkin_make, it gives the following output: Base path: /home/ben/workspaces/ROS/smf1 Source space: /home/ben/workspaces/ROS/smf1/src Build space: /home/ben/workspaces/ROS/smf1/build Devel space: /home/ben/workspaces/ROS/smf1/devel Install space: /home/ben/workspaces/ROS/smf1/install #### #### Running command: "make cmake_check_build_system" in "/home/ben/workspaces/ROS/smf1/build" #### #### #### Running command: "make -j4 -l4" in "/home/ben/workspaces/ROS/smf1/build" #### Built target smf1_gazebo_pkg_xacro_generated_to_devel_space_ I don't know what "smf1_gazebo_pkg_xacro_generated_to_devel_space_" is. I have a package called simply "smf1_gazebo_pkg". It uses xacro. catkin_make works fine in my other workspaces, and I don't see a difference in the CMakeLists.txt files. It doesn't seem to find any .xacro files or .gazebo files. The CMakeLists.txt file for the package smf1_gazebo_pkg is this: cmake_minimum_required(VERSION 2.8.3) project(mybot_description) ## Find catkin macros and libraries ## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) ## is used, also find other catkin packages find_package(catkin REQUIRED COMPONENTS geometry_msgs roscpp rviz tf urdf xacro ) include_directories( ${catkin_INCLUDE_DIRS} ) The CMakeLists.txt has the same thing for a sub package, but specifies its name, mybot_description. Here is what I get from running tree -L 3 ~/workspaces/ROS/smf1/src There should be files under urdf. That's where all the .xacro and .gazebo files are at. Also, the project runs. When I roslaunch the mybot_world.launch file, gazebo comes up and my robot appears. Changes don't reflect though, obviously. I'm getting really confussed. ├── CMakeLists.txt -> /opt/ros/kinetic/share/catkin/cmake/toplevel.cmake└── smf1_gazebo_pkg ├── CMakeLists.txt ├── include │   └── smf1_gazebo_pkg ├── launch │   └── mybot_world.launch ├── mybot_control │   ├── CMakeLists.txt │   ├── config │   ├── launch │   └── package.xml ├── mybot_description │   ├── CMakeLists.txt │   ├── package.xml │   └── urdf ├── mybot.rviz ├── package.xml ├── src └── worlds └── mybot.world Does anyone have any ideas about this? Thanks.

Get Modelstate Information for Turlebot

$
0
0
Hello Guys, I run ros Kinetic with gazebo 7.0. My project is a turtlebot who should drive to several objects and try to push them away after a try he should drive to the middle of the room again and drive to the next object. I tried Odometry for get information about the position of the robot, but the odometry increase the position for X and Y of the robot when the robot tries to push an object. So i think it should have a higher accuracy when i use modelstates. I got my odometry information with following piece of code: def newOdom(msg): global x global y global theta x = msg.pose.pose.position.x y = msg.pose.pose.position.y rot_q = msg.pose.pose.orientation (roll,pitch,theta) = euler_from_quaternion ([rot_q.x,rot_q.y,rot_q.z,rot_q.w]) rospy.init_node("speed_controller") sub = rospy.Subscriber("/odom",Odometry,newOdom) My question is: It is correct to make the same with the gazebo_msgs/ModelState Is it possible to get an example? I need this to get information for mobile_base.
Viewing all 1516 articles
Browse latest View live