2023-05-17 17:42:12 -0500 | received badge | ● Famous Question
(source)
|
2023-05-17 17:42:12 -0500 | received badge | ● Popular Question
(source)
|
2023-05-17 17:42:12 -0500 | received badge | ● Notable Question
(source)
|
2022-08-20 23:21:17 -0500 | commented answer | rosdep update error with "IncompleteRead()" Thanks! My issue seems more likely to be situation one. After I change my network proxy, I pass this command.
|
2022-08-20 23:17:19 -0500 | marked best answer | rosdep update error with "IncompleteRead()" When I try rosdep update follow as wiki tutorials, I got this return: reading in sources list data from /etc/ros/rosdep/sources.list.d
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml
Query rosdistro index https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml
Skip end-of-life distro "ardent"
Skip end-of-life distro "bouncy"
Skip end-of-life distro "crystal"
Skip end-of-life distro "dashing"
Skip end-of-life distro "eloquent"
Add distro "foxy"
ERROR: Rosdep experienced an error: IncompleteRead(179370 bytes read, 18022 more expected)
Please go to the rosdep page [1] and file a bug report with the stack trace below.
[1] : http://www.ros.org/wiki/rosdep
rosdep version: 0.22.1
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/rosdep2/main.py", line 146, in rosdep_main
exit_code = _rosdep_main(args)
File "/usr/lib/python3/dist-packages/rosdep2/main.py", line 444, in _rosdep_main
return _no_args_handler(command, parser, options, args)
File "/usr/lib/python3/dist-packages/rosdep2/main.py", line 453, in _no_args_handler
return command_handlers[command](options)
File "/usr/lib/python3/dist-packages/rosdep2/main.py", line 664, in command_update
update_sources_list(success_handler=update_success_handler,
File "/usr/lib/python3/dist-packages/rosdep2/sources_list.py", line 508, in update_sources_list
rosdep_data = get_gbprepo_as_rosdep_data(dist_name)
File "/usr/lib/python3/dist-packages/rosdep2/gbpdistro_support.py", line 147, in get_gbprepo_as_rosdep_data
distro_file = get_release_file(gbpdistro)
File "/usr/lib/python3/dist-packages/rosdep2/rosdistrohelper.py", line 76, in get_release_file
dist_file = rosdistro.get_distribution_file(get_index(), distro)
File "/usr/lib/python3/dist-packages/rosdistro/__init__.py", line 119, in get_distribution_file
data = _get_dist_file_data(index, dist_name, 'distribution')
File "/usr/lib/python3/dist-packages/rosdistro/__init__.py", line 202, in _get_dist_file_data
data.append(_load_yaml_data(u))
File "/usr/lib/python3/dist-packages/rosdistro/__init__.py", line 194, in _load_yaml_data
yaml_str = load_url(url)
File "/usr/lib/python3/dist-packages/rosdistro/loader.py", line 63, in load_url
contents = fh.read()
File "/usr/lib/python3.8/http/client.py", line 472, in read
s = self._safe_read(self.length)
File "/usr/lib/python3.8/http/client.py", line 615, in _safe_read
raise IncompleteRead(data, amt-len(data))
http.client.IncompleteRead: IncompleteRead(179370 bytes read, 18022 more expected)
|
2022-08-13 22:26:42 -0500 | asked a question | rosdep update error with "IncompleteRead()" rosdep update error with "IncompleteRead()"
When I try rosdep update follow as wiki tutorials, I got this return:
readi |
2022-08-08 00:52:52 -0500 | received badge | ● Famous Question
(source)
|
2022-07-27 06:42:01 -0500 | received badge | ● Famous Question
(source)
|
2022-05-23 21:00:43 -0500 | marked best answer | xacro: in-order processing became default in ROS MeLodic. I have exported an urdf file from solidwork and change it into xacro file ,but I meet some troubles when i launched it.
The original urdf file(display.launch) can be launched normally. When I launch my xacro file, it can't works. The problem is within the used launch file (robot.launch ): <launch>
<arg name="model" default="$(find xacro)/xacro --inorder '$(find myarm)/urdf/xacro/total.xacro'" />
<arg name="gui" default="True" />
<param name="robot_description" command="$(arg model)" />
<param name="use_gui" value="$(arg gui)" />
<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" />
<node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" />
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find model)/urdf.rviz" />
</launch>
The log is following. [roslaunch][INFO] 2020-03-30 21:00:25,178: starting in server mode
[roslaunch.parent][INFO] 2020-03-30 21:00:25,178: starting roslaunch parent run
[roslaunch][INFO] 2020-03-30 21:00:25,178: loading roscore config file /opt/ros/melodic/etc/ros/roscore.xml
[roslaunch][INFO] 2020-03-30 21:00:25,487: Added core node of type [rosout/rosout] in namespace [/]
[roslaunch.config][INFO] 2020-03-30 21:00:25,487: loading config file /home/heho/catkin_ws/src/myarm/launch/robot.launch
[roslaunch][INFO] 2020-03-30 21:00:25,675: Added node of type [joint_state_publisher/joint_state_publisher] in namespace [/]
[roslaunch][INFO] 2020-03-30 21:00:25,675: Added node of type [robot_state_publisher/state_publisher] in namespace [/]
[roslaunch][ERROR] 2020-03-30 21:00:25,675: Resource not found: model
ROS path [0]=/opt/ros/melodic/share/ros
ROS path [1]=/home/heho/catkin_ws/src
ROS path [2]=/opt/ros/melodic/share
[roslaunch][ERROR] 2020-03-30 21:00:25,675: The traceback for the exception was written to the log file
[roslaunch][ERROR] 2020-03-30 21:00:25,679: Traceback (most recent call last):
File "/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/__init__.py", line 330, in main
p.start()
File "/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/parent.py", line 289, in start
self._start_infrastructure()
File "/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/parent.py", line 238, in _start_infrastructure
self._load_config()
File "/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/parent.py", line 144, in _load_config
roslaunch_strs=self.roslaunch_strs, verbose=self.verbose)
File "/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/config.py", line 460, in load_config_default
loader.load(f, config, argv=args, verbose=verbose)
File "/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 761, in load
self._load_launch(launch, ros_config, is_core=core, filename=filename, argv=argv, verbose=verbose)
File "/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 733, in _load_launch
self._recurse_load(ros_config, launch.childNodes, self.root_context, None, is_core, verbose)
File "/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 671, in _recurse_load
n = self._node_tag(tag, context, ros_config, default_machine, verbose=verbose)
File "/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 96, in call
return f(*args, **kwds)
File "/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 390, in _node_tag
'launch-prefix ... (more) |
2022-04-23 21:23:37 -0500 | commented answer | Undefined reference to "tf2::fromMsg()" Oh! The editor didn't report this unmatch parameter and I ignore this... Thanks!
|
2022-04-23 20:50:45 -0500 | marked best answer | Undefined reference to "tf2::fromMsg()" I have saw link and link text , but both cant solve my problem. The error msg is follow e(geometry_msgs::Pose_<std::allocator<void> >)':
/home/bot/chh_ros_ws/src/car_navigation/navigation/car_motion_ctrl/src/ctrl_node.cpp:31: undefined reference to `void tf2::fromMsg<geometry_msgs::pose_<std::allocator<void> >, tf2::Quaternion>(geometry_msgs::Pose_<std::allocator<void> > const&, tf2::Quaternion&)'
collect2: error: ld returned 1 exit status
make[2]: * [car_navigation/navigation/car_motion_ctrl/CMakeFiles/ctrlNode.dir/build.make:107: /home/bot/chh_ros_ws/devel/lib/car_motion_ctrl/ctrlNode] Error 1
make[1]: [CMakeFiles/Makefile2:2583: car_navigation/navigation/car_motion_ctrl/CMakeFiles/ctrlNode.dir/all] Error 2
make: ** [Makefile:141: all] Error 2
Invoking "make -j8 -l8" failed I has follow Tutorials to do and include correct file. Here is my code #include "motion_controller.h"
#include <nav_msgs/Path.h>
#include "dwa_planner.h"
#include <tf2_geometry_msgs/tf2_geometry_msgs.h>
bool rec_flag = 0;
Pose_t cur_pose;
void path_pubRECV(const nav_msgs::Path::ConstPtr msg, std::vector<Pose_t> *path)
{
rec_flag = true;
Pose_t pt;
for(int i=0; i<msg->poses.size()-1; ++i) {
pt.x = msg->poses[i].pose.position.x;
pt.y = msg->poses[i].pose.position.y;
pt.yaw = atan((pt.y - msg->poses[i+1].pose.position.y)/
(pt.x - msg->poses[i+1].pose.position.x));
path->push_back(pt);
}
pt.x = msg->poses.back().pose.position.x;
pt.y = msg->poses.back().pose.position.y;
pt.yaw = cur_pose.yaw;
path->push_back(pt);
}
void UpdatePose(const geometry_msgs::Pose msg) {
tf2::Quaternion quat_tf;
tf2::fromMsg(msg, quat_tf);
cur_pose.x = msg.position.x;
cur_pose.y = msg.position.y;
cur_pose.yaw = quat_tf.getAngleShortestPath();
}
int main(int argc, char** argv)
{
ros::init(argc, argv, "ctrl_node");
ros::NodeHandle n;
string PathName = argv[1];
std::vector<Pose_t> global_path;
ros::Subscriber path_sub = n.subscribe<nav_msgs::Path>(PathName, 1, boost::bind(&path_pubRECV, _1, &global_path));
ros::Subscriber pos_sub = n.subscribe("car_position", 1, UpdatePose);
.......and so on
cmake_list is
cmake_minimum_required(VERSION 3.0.2)
project(car_motion_ctrl)
# SET(CMAKE_BUILD_TYPE Debug) find_package(catkin REQUIRED COMPONENTS
geometry_msgs
nav_msgs
roscpp
rospy
std_msgs
tf2
tf2_ros
tf2_geometry_msgs
)
catkin_package(
# INCLUDE_DIRS include
# LIBRARIES car_motion_ctrl
CATKIN_DEPENDS geometry_msgs nav_msgs roscpp rospy tf2 tf2_ros
# DEPENDS system_lib
)
include_directories(
# include
include/car_motionCtrl
include/local_planner
${catkin_INCLUDE_DIRS}
)
add_executable(ctrlNode src/ctrl_node.cpp)
target_link_libraries(ctrlNode ${catkin_LIBRARIES})
package.xml is here
<package format="2">
<name>car_motion_ctrl</name>
<version>0.0.0</version>
<description>The car_motion_ctrl package</description> <maintainer email="heho@todo.todo">heho</maintainer>
<license>TODO</license>
<buildtool_depend>catkin</buildtool_depend>
<build_depend>geometry_msgs</build_depend>
<build_export_depend>geometry_msgs</build_export_depend>
<exec_depend>geometry_msgs</exec_depend>
<build_depend>tf2_geometry_msgs</build_depend>
<build_export_depend>tf2_geometry_msgs</build_export_depend>
<exec_depend>tf2_geometry_msgs</exec_depend>
<build_depend>nav_msgs</build_depend>
<build_depend>roscpp</build_depend>
<build_depend>rospy</build_depend>
<build_export_depend>nav_msgs</build_export_depend>
<build_export_depend>roscpp</build_export_depend>
<build_export_depend>rospy</build_export_depend>
<exec_depend>nav_msgs</exec_depend>
<exec_depend>roscpp</exec_depend>
<exec_depend>rospy</exec_depend>
<build_depend>tf2</build_depend>
<build_export_depend>tf2</build_export_depend>
<exec_depend>tf2</exec_depend>
<build_depend>tf2_ros</build_depend>
<build_export_depend>tf2_ros</build_export_depend>
<exec_depend>tf2_ros</exec_depend>
<export>
</export>
</package>
And I should have install tf2 package, when I enter 'ls /opt/ros/noetic/lib/ | grep tf2', I got libtf2_ros.so
libtf2.so
tf2_kdl
tf2_ros
turtle_tf2 |
2022-04-23 20:50:24 -0500 | commented answer | Undefined reference to "tf2::fromMsg()" It works! But, why? I can find another overload in tf2_geometry_msgs.h in line 440 --- void fromMsg(const geometry_msgs: |
2022-04-23 20:40:17 -0500 | received badge | ● Notable Question
(source)
|
2022-04-23 10:46:30 -0500 | received badge | ● Popular Question
(source)
|
2022-04-22 06:57:31 -0500 | commented answer | Undefined reference to "tf2::fromMsg()" Yes, I got the same error and editor shows everything goes well.
|
2022-04-22 06:51:38 -0500 | commented answer | Undefined reference to "tf2::fromMsg()" I have try that make a other_msg = msg then tf2::fromMsg() but it won't works.
|
2022-04-22 05:58:40 -0500 | edited question | Undefined reference to "tf2::fromMsg()" Undefined reference to "tf2::fromMsg()"
I have saw link and link text , but both cant solve my problem.
The error msg i |
2022-04-22 05:53:18 -0500 | asked a question | Undefined reference to "tf2::fromMsg()" Undefined reference to "tf2::fromMsg()"
I have saw link and link text , but both cant solve my problem.
The error msg i |
2022-01-24 04:36:15 -0500 | received badge | ● Popular Question
(source)
|
2022-01-24 04:36:15 -0500 | received badge | ● Notable Question
(source)
|
2021-11-08 20:53:42 -0500 | commented question | How to change log file subdirectory's name? OK, I got it. And thanks for your advice.
|
2021-11-08 05:05:58 -0500 | commented question | rqt_console shows the same message twice? Hi @serhat , have you ever solve this problem?
|
2021-11-05 05:02:47 -0500 | asked a question | How to change log file subdirectory's name? How to change log file subdirectory's name?
As wiki has said can change link ROS_LOG_DIR , but I want further.
When ros |
2021-11-05 04:44:43 -0500 | received badge | ● Famous Question
(source)
|
2021-11-05 04:31:58 -0500 | received badge | ● Notable Question
(source)
|
2021-11-04 09:10:25 -0500 | received badge | ● Famous Question
(source)
|
2021-08-30 08:10:39 -0500 | received badge | ● Famous Question
(source)
|
2021-05-26 15:45:41 -0500 | marked best answer | Why my hardware interface can't get command from controller? Hello, everyone I have succeed to connect the Gazebo with MOVEIT by editing my yaml files and launch files.
And now I decide to write a hardware interface to control my real robot by joint-trajectory-controller.
When I plan&execute in MOVEIT and got the output [ INFO] [1591108238.930099466, 183.801000000]: Controller mybot/my_trajectory_controller successfully finished
[ INFO] [1591108239.029073528, 183.900000000]: Completed trajectory execution with status SUCCEEDED ...
[ INFO] [1591108239.029210111, 183.900000000]: Execution completed: SUCCEEDED
But the data of the topic I publish in the "write" method does not have any change. And I run the rqt_graph . It seems that my hardware interface does not connect with the follow_joint_trajectory/action_topics . Did I write the hardware interface in a worry way?Or did I misunderstand something? I have "connect and register the joint state interface & joint position interface" hardware_interface::JointStateHandle state_handle_0("joint0", &pos[0], &vel[0], &eff[0]);
jnt_state_interface.registerHandle(state_handle_0);
//.............
hardware_interface::JointStateHandle state_handle_4("joint4", &pos[4], &vel[4], &eff[4]);
jnt_state_interface.registerHandle(state_handle_4);
registerInterface(&jnt_state_interface);
hardware_interface::JointHandle pos_handle_0(jnt_state_interface.getHandle("joint0"), &cmd[0]);
jnt_pos_interface.registerHandle(pos_handle_0);
//........
hardware_interface::JointHandle pos_handle_4(jnt_state_interface.getHandle("joint4"), &cmd[4]);
jnt_pos_interface.registerHandle(pos_handle_4);
registerInterface(&jnt_pos_interface);
and write(without read) void MyHWInterface::write()
{
for(int i=0; i<4; i++)
{
//ROS_INFO("[%f]", cmd[i]);
cmd_msg[i].data=cmd[i];
pub_cmd[i].publish(cmd_msg[i]);
}
}
the main loop int main(int argc, char** argv)
{
ros::init(argc, argv, "mybot");
ros::NodeHandle nh;
MyHWInterface bot;
controller_manager::ControllerManager ctrl(&bot, nh); //class of controller,link to bot
ros::Rate rate(1.0 / bot.getPeriod().toSec());
ros::AsyncSpinner spinner(1);
spinner.start();
ROS_INFO("HW has been launch!");
while(ros::ok())
{
ctrl.update(bot.getTime(), bot.getPeriod());
bot.write();
rate.sleep();
}
spinner.stop();
return 0;
}
my yaml file mybot:
my_trajectory_controller:
type: "position_controllers/JointTrajectoryController"
joints:
- joint0
- joint1
- joint2
- joint3
- joint4
constraints:
goal_time: &goal_time_constraint 10
stopped_velocity_tolerance: 0
joint0:
goal: &goal_pos_constraint 0.5
trajectory: &trajectory_pos_constraint 0.1
joint1:
goal: *goal_pos_constraint
trajectory: *trajectory_pos_constraint
joint2:
goal: *goal_pos_constraint
trajectory: *trajectory_pos_constraint
joint3:
goal: *goal_pos_constraint
trajectory: *trajectory_pos_constraint
joint4:
goal: *goal_pos_constraint
trajectory: *trajectory_pos_constraint
#gazebo_ros_control/pid_
gains:
joint0: {p: 0.6, i: 0.1, d: 0.16, i_clamp: 1}
joint1: {p: 0.6, i: 0.2, d: 0.1, i_clamp: 1}
joint2: {p: 0.6, i: 0.1, d: 0.05, i_clamp: 1}
joint3: {p: 0.45, i: 0.015, d: 0.01, i_clamp: 1}
joint4: {p: 0.3, i: 0.01, d: 0.01, i_clamp: 1}
my direct launch file <launch>
<!--robot description-->
<param name="robot_description" command="$(find xacro)/xacro --inorder '$(find mybot_description)/urdf/moveit_gazebo/mybot.xacro'" />
<!-- my hardwareinterface -->
<node name="mybot" pkg="mybot_control" type="myhw" output="screen"/>
<!-- Load joint controller configurations from YAML file to parameter server -->
<rosparam file="$(find mybot_control)/config/trajectory.yaml" command="load"/>
<!-- load the controllers -->
<node name="trajectory_controller_spawner" pkg="controller_manager" type="spawner" respawn="false"
output="screen" ns="/mybot" args="my_trajectory_controller"/>
<!--about joint states-->
<!--<node name="joint_controller_spawner" pkg="controller_manager" type="spawner" respawn="false"
output="screen" args="joint_state_controller" /> -->
</launch>
What should I do to ... (more) |
2021-05-19 14:20:48 -0500 | received badge | ● Famous Question
(source)
|
2021-05-18 05:02:34 -0500 | received badge | ● Popular Question
(source)
|
2021-05-18 05:02:34 -0500 | received badge | ● Notable Question
(source)
|
2021-05-17 07:27:55 -0500 | commented question | already install package[nav_msgs] with command[sudo apt install ros-melodic-nav-msgs] ,but catkin_make still will output error cant find nav_msg Can you find some floder name like "nav_msgs" in devel/share of your catkin workspace? If you have ever clone some offic |
2021-05-17 07:27:07 -0500 | commented question | already install package[nav_msgs] with command[sudo apt install ros-melodic-nav-msgs] ,but catkin_make still will output error cant find nav_msg Can you find some flod name like "nav_msgs" in devel/share of your catkin workspace? If you have ever clone some offical |
2021-04-09 03:29:18 -0500 | received badge | ● Popular Question
(source)
|
2021-04-07 08:34:48 -0500 | edited question | What's the role of "overbuffer" in dijkstra algorithm source code? What's the role of "overbuffer" in dijkstra algorithm source code?
My understanding of the code is as follows:
Instead |
2021-04-06 10:06:26 -0500 | asked a question | What's the role of "overbuffer" in dijkstra algorithm source code? What's the role of "overbuffer" in dijkstra algorithm source code?
My understanding of the code is as follows:
Instead |
2021-03-22 09:39:06 -0500 | received badge | ● Notable Question
(source)
|
2021-03-22 09:13:34 -0500 | asked a question | Skid_steer_drive_controller output an opposite direction Skid_steer_drive_controller output an opposite direction
After receiving a geometry_msg in a +x direction, but my robot |
2021-03-20 03:13:01 -0500 | commented answer | Roomba 400 AMCL launch file error Thank you! I ran into the same issue. And after I reconfig the footprint in costmap_common_params.yaml, I solve the prob |
2021-02-01 09:33:33 -0500 | received badge | ● Popular Question
(source)
|
2021-02-01 09:33:31 -0500 | commented question | Differences between effort_controllers and velocity_controllers? Thanks for reply!
This question may be related to the following
As I understand it, velocity_controller can always let |
2021-02-01 09:32:59 -0500 | commented question | Differences between effort_controllers and velocity_controllers? Thanks for reply!
This question may be related to the following
As I understand it, velocity_controller can always let t |
2021-02-01 01:52:06 -0500 | received badge | ● Student
(source)
|
2021-02-01 01:23:05 -0500 | asked a question | Differences between effort_controllers and velocity_controllers? Differences between effort_controllers and velocity_controllers?
As the Wiki has said, both effort_controllers or veloci |
2021-02-01 00:31:43 -0500 | received badge | ● Notable Question
(source)
|