huchunxu / ros_exploring Goto Github PK
View Code? Open in Web Editor NEW《ROS机器人开发实践》源码
Home Page: https://www.guyuehome.com
《ROS机器人开发实践》源码
Home Page: https://www.guyuehome.com
这个问题怎么解决呢。 ax12是您自定义的模块吗?
i try to roslaunch mrobot_navigation fake_nav_cloister_demo.launch, and then it doesn't work:
the terminal says that >>
Warning: Invalid argument "/map" passed to canTransform argument target_frame in tf2 frame_ids cannot start with a '/' like:
at line 134 in /tmp/binarydeb/ros-melodic-tf2-0.6.3/src/buffer_core.cpp
i set up the navigation goal, but the car didn't move...
And i found the solution on the internet: ros-planning/navigation#794
solve it by removing the "/" in global_costmap_params.yaml and local_costmap_params.yaml
finally, it works.
Hello
when i run your code in mrobot_gazebo
roslaunch mrobot_gazebo view_mrobot_with_camera_gazebo.launch
it works well and i can control it via the mrobot_teleop.launch
. But when i run the rqt_image_view
.The gazebo has the error:
gzserver: /build/ogre-1.9-mqY1wq/ogre-1.9-1.9.0+dfsg1/OgreMain/src/OgreRenderSystem.cpp:546: virtual void Ogre::RenderSystem::setDepthBufferFor(Ogre::RenderTarget*): Assertion `bAttached && "A new DepthBuffer for a RenderTarget was created, but after creation" "it says it's incompatible with that RT"' failed.
Aborted (core dumped)
[gazebo-1] process has died [pid 332, exit code 134, cmd /opt/ros/kinetic/lib/gazebo_ros/gzserver -e ode /home/zxf/my_was/src/mrobot_gazebo/worlds/playground.world __name:=gazebo __log:=/home/zxf/.ros/log/c198788e-61de-11e9-86e1-7c2a31503f61/gazebo-1.log].
log file: /home/zxf/.ros/log/c198788e-61de-11e9-86e1-7c2a31503f61/gazebo-1*.log
could you give me some advice? thanks a lot!
原书16页
2.3.2小节 元功能包
语句——“此外,元功能包清单不需要<buildtool_depend>标签声明编译过程依赖的其他功能包” 其中<buildtool_depend>是否应该写为:<build_depend> ?
找了很多地方都没有相关的资料诶。。。
胡老师,您好。我的系统是Ubuntu 20.04 + noetic版本,在执行如下两条命令时
原书18、19页
2.5.1节、2.5.2节
图2-10、图2-11中的步骤从“0”开始编号,而图下方的解释从“1”开始编号。对应不起来,影响阅读体验。
图2-11 编号少了“3”
roslaunch mrobot_gazebo view_mrobot_gazebo.launch
... logging to /home/lansher/.ros/log/289feef6-5267-11ec-b666-bfd761c8268d/roslaunch-lansher-41626.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
xacro: in-order processing became default in ROS Melodic. You can drop the option.
started roslaunch server http://lansher:36657/
PARAMETERS
NODES
/
gazebo (gazebo_ros/gzserver)
gazebo_gui (gazebo_ros/gzclient)
joint_state_publisher (joint_state_publisher/joint_state_publisher)
robot_state_publisher (robot_state_publisher/robot_state_publisher)
urdf_spawner (gazebo_ros/spawn_model)
ROS_MASTER_URI=http://localhost:11311
process[gazebo-1]: started with pid [41642]
process[gazebo_gui-2]: started with pid [41646]
process[joint_state_publisher-3]: started with pid [41652]
process[robot_state_publisher-4]: started with pid [41653]
process[urdf_spawner-5]: started with pid [41654]
[ WARN] [1638336988.298653637]: link 'base_link' material 'yellow' undefined.
[ WARN] [1638336988.300318404]: link 'base_link' material 'yellow' undefined.
[INFO] [1638336988.721806]: Loading model XML from ros parameter robot_description
[INFO] [1638336988.727805]: Waiting for service /gazebo/spawn_urdf_model
[INFO] [1638336988.734066]: Calling service /gazebo/spawn_urdf_model
[ERROR] [1638336988.740478559]: SpawnModel: Failure - model name mrobot already exist.
[INFO] [1638336988.740820]: Spawn status: SpawnModel: Failure - entity already exists.
[ERROR] [1638336988.742357]: Spawn service failed. Exiting.
[gazebo-1] process has died [pid 41642, exit code 255, cmd /home/lansher/catkin_ws/src/gazebo_ros_pkgs/gazebo_ros/scripts/gzserver -e ode /home/lansher/catkin_ws/src/mrobot_gazebo/worlds/playground.world __name:=gazebo __log:=/home/lansher/.ros/log/289feef6-5267-11ec-b666-bfd761c8268d/gazebo-1.log].
log file: /home/lansher/.ros/log/289feef6-5267-11ec-b666-bfd761c8268d/gazebo-1*.log
[ INFO] [1638336988.994434910]: waitForService: Service [/gazebo_gui/set_physics_properties] has not been advertised, waiting...
[ INFO] [1638336988.996864370]: Finished loading Gazebo ROS API Plugin.
[ WARN] [1638336989.039222925, 630.580000000]: Shutdown request received.
[ WARN] [1638336989.039411879, 630.580000000]: Reason given for shutdown: [[/gazebo_gui] Reason: new node registered with same name]
[urdf_spawner-5] process has died [pid 41654, exit code 1, cmd /home/lansher/catkin_ws/devel/lib/gazebo_ros/spawn_model -urdf -model mrobot -param robot_description __name:=urdf_spawner __log:=/home/lansher/.ros/log/289feef6-5267-11ec-b666-bfd761c8268d/urdf_spawner-5.log].
log file: /home/lansher/.ros/log/289feef6-5267-11ec-b666-bfd761c8268d/urdf_spawner-5*.log
Trace/breakpoint trap (core dumped)
`
robot_vision 里面的 usb_cam.launch运行时报错,ERROR: cannot launch node of type [usb_cam/usb_cam_node]: usb_cam
roslaunch mrobot_gazebo view_mrobot_gazebo.launch
... logging to /home/lansher/.ros/log/289feef6-5267-11ec-b666-bfd761c8268d/roslaunch-lansher-42369.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
xacro: in-order processing became default in ROS Melodic. You can drop the option.
started roslaunch server http://lansher:44513/
PARAMETERS
NODES
/
gazebo (gazebo_ros/gzserver)
gazebo_gui (gazebo_ros/gzclient)
joint_state_publisher (joint_state_publisher/joint_state_publisher)
robot_state_publisher (robot_state_publisher/robot_state_publisher)
urdf_spawner (gazebo_ros/spawn_model)
ROS_MASTER_URI=http://localhost:11311
process[gazebo-1]: started with pid [42385]
process[gazebo_gui-2]: started with pid [42389]
process[joint_state_publisher-3]: started with pid [42395]
process[robot_state_publisher-4]: started with pid [42396]
process[urdf_spawner-5]: started with pid [42397]
[ WARN] [1638337379.958729611]: Shutdown request received.
[ WARN] [1638337379.958785104]: Reason given for shutdown: [[/robot_state_publisher] Reason: new node registered with same name]
[ WARN] [1638337379.961768081]: link 'base_link' material 'yellow' undefined.
[ WARN] [1638337379.963353600]: link 'base_link' material 'yellow' undefined.
[INFO] [1638337380.393707]: Loading model XML from ros parameter robot_description
[INFO] [1638337380.399691]: Waiting for service /gazebo/spawn_urdf_model
[WARN] [1638337380.403952]: wait_for_service(/gazebo/spawn_urdf_model): failed to contact, will keep trying
[ INFO] [1638337380.563418959]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[ INFO] [1638337380.565506077]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1638337380.634588913]: waitForService: Service [/gazebo_gui/set_physics_properties] has not been advertised, waiting...
[ INFO] [1638337380.636105684]: Finished loading Gazebo ROS API Plugin.
[INFO] [1638337381.010323]: wait_for_service(/gazebo/spawn_urdf_model): finally were able to contact [rosrpc://lansher:51887]
[INFO] [1638337381.013769]: Calling service /gazebo/spawn_urdf_model
[ INFO] [1638337381.045061249]: waitForService: Service [/gazebo/set_physics_properties] is now available.
libcurl: (5) Could not resolve proxy: http
[INFO] [1638337381.216835]: Spawn status: SpawnModel: Successfully spawned entity
[ INFO] [1638337381.230930738]: Physics dynamic reconfigure ready.
[ INFO] [1638337381.240718709]: Starting plugin DiffDrive(ns = //)
[ INFO] [1638337381.241129999]: DiffDrive(ns = //): = Debug
[ INFO] [1638337381.242247061]: DiffDrive(ns = //): <tf_prefix> =
[DEBUG] [1638337381.242596085]: DiffDrive(ns = //): = cmd_vel
[DEBUG] [1638337381.242618036]: DiffDrive(ns = //): = odom
[DEBUG] [1638337381.242630840]: DiffDrive(ns = //): = odom
[DEBUG] [1638337381.242644636]: DiffDrive(ns = //): = base_footprint
[DEBUG] [1638337381.242714316]: DiffDrive(ns = //): = true
[ WARN] [1638337381.242732851]: DiffDrive(ns = //): missing default is true
[DEBUG] [1638337381.242759431]: DiffDrive(ns = //): = true
[DEBUG] [1638337381.243152116]: DiffDrive(ns = //): = 0.26000000000000001
[DEBUG] [1638337381.243181581]: DiffDrive(ns = //): = 0.066000000000000003
[DEBUG] [1638337381.243204364]: DiffDrive(ns = //): = 1.8
[DEBUG] [1638337381.243227327]: DiffDrive(ns = //): = 30
[DEBUG] [1638337381.243246693]: DiffDrive(ns = //): = 100
[ WARN] [1638337381.243931035]: DiffDrive(ns = //): missing default is 1
[DEBUG] [1638337381.244192014]: DiffDrive(ns = //): = base_to_wheel_left_joint
您好,在navigation仿真导航中,如果删除了rviz文件夹中已经跑出图并保存好的.rviz文件,则在roslaunch mrobot_navigation fake_nav_cloister_demo.launch时,rviz仿真界面中的displays就会只显示默认标签,没有map、odometry、inflated obstacles等书中实例结果所显示的标签。
原书485页
14.25.节
倒数第二行的“catikin”拼写有误,多了一个字母“i”.
胡老师您好:
我刚刚开始学习ros机器人,现在我仿照您写的ros机器人开发上的案例写了一个urdf小车描述文件,在加载进gazebo是正常的,但是我启用键盘控制,我发现小车不会动,这是什么问题阿。
以下是我的xacro文件内容:
`
<xacro:macro name="sphere_inertial_matrix" params="m r">
</xacro:macro>
<xacro:macro name="cylinder_inertial_matrix" params="m r h">
<inertial>
<mass value="${m}" />
<inertia ixx="${m*(3*r*r+h*h)/12}" ixy = "0" ixz = "0"
iyy="${m*(3*r*r+h*h)/12}" iyz = "0"
izz="${m*r*r/2}" />
</inertial>
</xacro:macro>
<xacro:macro name="box_inertial_matrix" params="m w h d">
<inertial>
<mass value="${m}" />
<inertia ixx="${m*(h*h+d*d)/12}" ixy = "0" ixz = "0"
iyy="${m*(w*w+d*d)/12}" iyz = "0"
izz="${m*(w*w+h*h)/12}" />
</inertial>
</xacro:macro>
<xacro:macro name="wheel" params="prefix reflect parent_link">
<joint name="${prefix}_wheel_joint" type="continuous">
<origin xyz="-1.012 ${reflect*wheel_joint_y} 0.04" rpy="0 0 0"/>
<parent link="${parent_link}"/>
<child link="${prefix}_wheel_link"/>
<axis xyz="0 1 0"/>
</joint>
<link name="${prefix}_wheel_link">
<visual>
<origin xyz="0 0 0" rpy="${M_PI/2} 0 0"/>
<geometry>
<cylinder length="0.08" radius="0.04" />
</geometry>
<material name="gray"/>
</visual>
<collision>
<origin xyz="0 0 0" rpy="${M_PI/2} 0 0"/>
<geometry>
<cylinder length="0.08" radius="0.04" />
</geometry>
</collision>
<cylinder_inertial_matrix m="0.1" r="0.04" h="0.08" />
</link>
<gazebo reference="${prefix}_wheel_link">
<material>Gazebo/Gray</material>
</gazebo>
<!-- Transmission is important to link the joints and the controller -->
<transmission name="${prefix}_wheel_trans">
<type>transmission_interface/SimpleTransmission</type>
<joint name="${prefix}_wheel_joint" />
<actuator name="${prefix}_wheel_joint_motor">
<hardwareInterface>VelocityJointInterface</hardwareInterface> <!--VelocityJointInterface-->
<mechanicalReduction>1</mechanicalReduction>
</actuator>
</transmission>
</xacro:macro>
<!-- wan xiang lun -->
<xacro:macro name="caster" params="prefix reflect parent_link">
<joint name="${prefix}_caster_joint" type="continuous">
<origin xyz="-0.0671 ${reflect*caster_joint_y} 0.08" rpy="0 0 0"/>
<parent link="${parent_link}"/>
<child link="${prefix}_caster_link"/>
<axis xyz="0 1 0"/>
</joint>
<link name="${prefix}_caster_link">
<visual>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<sphere radius="0.08" />
</geometry>
<material name="gray"/>
</visual>
<collision>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<sphere radius="0.08" />
</geometry>
</collision>
<sphere_inertial_matrix m="0.1" r="0.08" />
</link>
<gazebo reference="${prefix}_caster_link">
<material>Gazebo/Gray</material>
</gazebo>
</xacro:macro>`
下面是我执行命令rostopic info /cmd_vel的结果:
`
Type: geometry_msgs/Twist
Publishers: None
Subscribers:
当启动键盘控制命令roslaunch mrobot_teleop mrobot_teleop.launch的结果:
Type: geometry_msgs/TwistPublishers:
Subscribers:
`
我想请教下我该怎么改才能正确使用键盘控制小车呢?
还有就是我想请问下有什么值的推荐的ros学习论坛么么?目前遇到问题都不知道去哪里提问。
请问有没有marm_with_kinetic_moveit_config 文件夹和marm_planning pub_3d_target.py arm_tracker.py
<joint name="base_left_motor_joint" type="fixed">
<origin xyz="${motor_x} ${motor_y} 0" rpy="0 0 0" />
<parent link="base_link"/>
<child link="left_motor" />
</joint>
<joint name="left_wheel_joint" type="continuous">
<origin xyz="0 ${(motor_length+wheel_length)/2} 0" rpy="0 0 0"/>
<parent link="left_motor"/>
<child link="left_wheel_link"/>
<axis xyz="0 1 0"/>
</joint>
<joint name="base_right_motor_joint" type="fixed">
<origin xyz="${motor_x} -${motor_y} 0" rpy="0 0 0" />
<parent link="base_link"/>
<child link="right_motor" />
</joint>
<joint name="right_wheel_joint" type="continuous">
<origin xyz="0 -${(motor_length+wheel_length)/2} 0" rpy="0 0 0"/>
<parent link="right_motor"/>
<child link="right_wheel_link"/>
<axis xyz="0 1 0"/>
</joint>
motor_x
是负的, motor_y
, motor_length
和 wheel_length
都是正的
左轮joint的y是正的,右轮joint的y是负的
这也符合+x向前,+y向左,+z向上的定义
根据 gazebo 教程 http://gazebosim.org/tutorials?tut=guided_b3 ,确实是这样定义的
<joint name="base_to_wheel_${lr}_joint" type="continuous">
<parent link="base_link"/>
<child link="wheel_${lr}_link"/>
<origin xyz="${motor_x} ${translateY * base_link_radius} 0" rpy="0 0 0" />
<axis xyz="0 1 0" rpy="0 0" />
</joint>
<wheel lr="right" translateY="1" />
<wheel lr="left" translateY="-1" />
motor_x
是负的, base_link_radius
是正的
左轮joint的 y 是负的,右轮joint的 y 是正的,这与之前看到的定义是冲突的
请问这是以下哪种情况
如果不是打字错误,能否解答一下我的疑惑,感谢!
另外我跑过6.7.3的mbot_teleop,源码的状况符合真实指令的要求,自己改了translateY的正负性之后反而反了。
只看源码print加括号了,以为用的python3,后来才发现是2
古月老师,你好,请问你《ros机器人开发实践》的源码,也就是ros_exploring中有好几个文件夹,以robot_mrobot为例,它包含好几个功能包,像mrobot_bringup、mrobot_description这些的,那我把你的源码复制到我工作空间的src文件夹中,是应该把mrobot_bringup、mrobot_description这些功能包一个个复制过来,还是说我直接复制robot_mrobot这个文件夹就行
在melodic上编译时,会报错,卡在了缺少manipulation_msgsConfig.cmake和manipulation_msgs-config.cmake文件,据我所知,是Kinect版本有的
作者的演示显示的是中文,为什么我这边就显示的unicode呢?
xilinx@pc1:~/catkin_ws$ rosdep install --from-paths src --ignore-src --rosdistro=kinetic -y
ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
pocketsphinx: No definition of [python-gst] for OS version [xenial]
sudo apt install python-gst-1.0
这里依赖的gst包的名称似乎应该是python-gst-1.0
arm_gazebo_controller.launch 文件似乎并没有被使用,请问这个文件是不需要的么?还是说忘记写在 bringup 的 launch 文件里了
如题,在learning_tf中,启动launch后仿真器中只有一个乌龟,没有实现一只乌龟跟随另一只乌龟运动。
请古月居大佬百忙之中解惑,谢谢!
g@g-system-product-name:/SensorKinect/Bin$ cd Sensor-Bin-Linux-x64-v5.1.2.1//SensorKinect/Bin/Sensor-Bin-Linux-x64-v5.1.2.1$ ls
g@g-system-product-name:
Bin Config GPL.txt Install install.sh LGPL.txt Lib
g@g-system-product-name:/SensorKinect/Bin/Sensor-Bin-Linux-x64-v5.1.2.1$ ls Install//SensorKinect/Bin/Sensor-Bin-Linux-x64-v5.1.2.1$ sudo ./install.sh
55-primesense-usb.rules blacklist-gspca-kinect.conf
g@g-system-product-name:
[sudo] password for g:
Installing PrimeSense Sensor
creating config dir /usr/etc/primesense...OK
copying shared libraries...OK
copying executables...OK
registering module 'libXnDeviceSensorV2KM.so' with OpenNI...OK
registering module 'libXnDeviceFile.so' with OpenNI...OK
copying server config file...OK
setting uid of server...OK
creating server logs dir...OK
installing usb rules...OK
installing modprobe blacklist...OK
*** DONE ***
我的系统是ubuntu 16.04 安装驱动显示也成功 但是为什么还是显示没有设备连接呢?
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://g-system-product-name:43641/
PARAMETERS
NODES
/camera/
camera_nodelet_manager (nodelet/nodelet)
depth_registered_hw_metric_rect (nodelet/nodelet)
depth_registered_metric (nodelet/nodelet)
depth_registered_rectify_depth (nodelet/nodelet)
driver (nodelet/nodelet)
points_xyzrgb_hw_registered (nodelet/nodelet)
rgb_debayer (nodelet/nodelet)
rgb_rectify_color (nodelet/nodelet)
rgb_rectify_mono (nodelet/nodelet)
auto-starting new master
process[master]: started with pid [5494]
ROS_MASTER_URI=http://localhost:11311
setting /run_id to c6dc6758-ca0b-11e8-b46b-2cfda1bc2526
process[rosout-1]: started with pid [5507]
started core service [/rosout]
process[camera/camera_nodelet_manager-2]: started with pid [5524]
process[camera/driver-3]: started with pid [5525]
process[camera/rgb_debayer-4]: started with pid [5526]
process[camera/rgb_rectify_mono-5]: started with pid [5527]
process[camera/rgb_rectify_color-6]: started with pid [5536]
process[camera/depth_registered_rectify_depth-7]: started with pid [5557]
process[camera/points_xyzrgb_hw_registered-8]: started with pid [5567]
process[camera/depth_registered_hw_metric_rect-9]: started with pid [5583]
process[camera/depth_registered_metric-10]: started with pid [5592]
[ INFO] [1538901257.110013562]: Initializing nodelet with 4 worker threads.
[ INFO] [1538901257.211923164]: No devices connected.... waiting for devices to be connected
[ INFO] [1538901260.212137123]: No devices connected.... waiting for devices to be connected
[ INFO] [1538901263.212348427]: No devices connected.... waiting for devices to be connected
[ INFO] [1538901266.212569534]: No devices connected.... waiting for devices to be connected
g@g:~$ rosbag play rgbd_dataset_freiburg1_desk.bag
Usage: rosbag play BAGFILE1 [BAGFILE2 BAGFILE3 ...]
rosbag: error: Cannot find rosbag/play executable
在MoveIt!编程学习章节中运行代码都出现了类似的错误,以关节空间规划为例:
运行rosrun marm_planning moveit_fk_demo.py命令后,机械臂没有运动,运行launch文件的终端输出为:
You can start planning now!
[ INFO] [1562576474.274474940]: Combined planning and execution request received for MoveGroup action. Forwarding to planning and execution pipeline.
[ INFO] [1562576474.274891116]: Goal constraints are already satisfied. No need to plan or execute any motions
[ INFO] [1562576476.354635249]: Combined planning and execution request received for MoveGroup action. Forwarding to planning and execution pipeline.
[ INFO] [1562576476.354985038]: Planning attempt 1 of at most 1
[ INFO] [1562576476.357638285]: Planner configuration 'gripper' will use planner 'geometric::RRTConnect'. Additional configuration parameters will be set when the planner is constructed.
[ INFO] [1562576476.358687775]: RRTConnect: Starting planning with 1 states already in datastructure
[ INFO] [1562576476.369870458]: RRTConnect: Created 4 states (2 start + 2 goal)
[ INFO] [1562576476.369955176]: Solution found in 0.011544 seconds
[ INFO] [1562576476.373558468]: SimpleSetup: Path simplification took 0.003387 seconds and changed from 3 to 2 states
[ INFO] [1562576476.904228113]: Completed trajectory execution with status SUCCEEDED ...
[ INFO] [1562576478.004197492]: Combined planning and execution request received for MoveGroup action. Forwarding to planning and execution pipeline.
[ INFO] [1562576478.004402229]: Planning attempt 1 of at most 1
[ INFO] [1562576478.005634270]: Planner configuration 'arm' will use planner 'geometric::RRTConnect'. Additional configuration parameters will be set when the planner is constructed.
[ INFO] [1562576478.006322077]: RRTConnect: Starting planning with 1 states already in datastructure
*** stack smashing detected **: /opt/ros/kinetic/lib/moveit_ros_move_group/move_group terminated
[move_group-5] process has died [pid 3031, exit code -6, cmd /opt/ros/kinetic/lib/moveit_ros_move_group/move_group __name:=move_group __log:=/home/tfwang/.ros/log/e1019aec-a15e-11e9-a219-88b11175f2f1/move_group-5.log].
log file: /home/tfwang/.ros/log/e1019aec-a15e-11e9-a219-88b11175f2f1/move_group-5.log
您好,在使用robot_voice源码包时,carkin_make出现/usr/bin/ld: cannot find -lmsc,请问这个问题怎么解决
作者和各位读者好,我按照书中第三章ROS基础,创建hello_world功能包,发现如下错误:
按照书中教程创建3.6 创建一个Publisher(talker) 和 Subscriber(listener) 的hello_world的功能包,无法正确catkin_make.
原因是:CMakeLists.txt文件
作者的源代码如下:
include_directories(
include
${catkin_INCLUDE_DIRS}
)
add_executable(talker src/talker.cpp)
target_link_libraries(talker ${catkin_LIBRARIES})
add_dependencies(talker ${PROJECT_NAME}_generate_messages_cpp)
add_executable(listener src/listener.cpp)
target_link_libraries(listener ${catkin_LIBRARIES})
add_dependencies(talker ${PROJECT_NAME}_generate_messages_cpp)
发现无法正确catkin_make。报错如下:
GitHub的源代码有两个add_dependencies(talker,我觉得可能敲错了,后面一个为listener
我修改如下后可以正常运行:
include_directories(
# include
${catkin_INCLUDE_DIRS}
)
add_executable(talker src/talker.cpp)
target_link_libraries(talker ${catkin_LIBRARIES})
add_executable(listener src/listener.cpp)
target_link_libraries(listener ${catkin_LIBRARIES})
原因总结:和3.6.6的自定义话题消息有关,在初学和敲代码talker和listener时,CMakeLists.txt文件不应该加入add_dependencies(talker....
这个是3.6.6的自定义话题消息 运行rosmsg show Person命令后文件新增的。应该在书中3.6.4章节(编译功能包)中不加入add_dependencies(talker ${PROJECT_NAME}_generate_messages_cpp) 以及add_dependencies(listener${PROJECT_NAME}_generate_messages_cpp),否则catkin_make失败。
本人初学ROS,希望提出这个小问题,增强和大家的互动性,提高学习动力。手动加油😀
ubuntu16.04
ROS Kinetic
ROS机器人开发实践 P146 6.72节
Traceback (most recent call last):
File "/opt/ros/kinetic/lib/xacro/xacro", line 32, in
import xacro
File "/opt/ros/kinetic/lib/python2.7/dist-packages/xacro/init.py", line 42, in
from roslaunch import substitution_args
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/init.py", line 56, in
from .launch import ROSLaunchRunner
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/launch.py", line 55, in
from roslaunch.nodeprocess import create_master_process, create_node_process
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/nodeprocess.py", line 52, in
from rosmaster.master_api import NUM_WORKERS
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosmaster/init.py", line 35, in
from .main import rosmaster_main
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosmaster/main.py", line 43, in
import rosmaster.master
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosmaster/master.py", line 47, in
import rosmaster.master_api
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosmaster/master_api.py", line 72, in
from rosmaster.util import xmlrpcapi
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosmaster/util.py", line 48, in
from defusedxml.xmlrpc import monkey_patch
ImportError: No module named defusedxml.xmlrpc
roscore
rosrun xacro xacro.py --check-order mrobot.urdf.xacro
Traceback (most recent call last):
File "/opt/ros/kinetic/share/xacro/xacro.py", line 55, in
import xacro
File "/opt/ros/kinetic/lib/python2.7/dist-packages/xacro/init.py", line 42, in
from roslaunch import substitution_args
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/init.py", line 56, in
from .launch import ROSLaunchRunner
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/launch.py", line 55, in
from roslaunch.nodeprocess import create_master_process, create_node_process
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/nodeprocess.py", line 52, in
from rosmaster.master_api import NUM_WORKERS
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosmaster/init.py", line 35, in
from .main import rosmaster_main
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosmaster/main.py", line 43, in
import rosmaster.master
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosmaster/master.py", line 47, in
import rosmaster.master_api
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosmaster/master_api.py", line 72, in
from rosmaster.util import xmlrpcapi
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosmaster/util.py", line 48, in
from defusedxml.xmlrpc import monkey_patch
ImportError: No module named defusedxml.xmlrpc
所以想请问作者一下,这个问题怎么解决好呢
胡老师你好,我正在看ROS机器人开发实践,在运行第6章6.7.2小节中的命令:roslaunch mrobot_gazebo view_mrobot_gazebo.launch时,出现Gazebo启动黑屏,但是没有出现错误。下面介绍我的经历流程:
(1)第一次运行命令:roslaunch mrobot_gazebo view_mrobot_gazebo.launch 出现[REST.cc:205] Error in REST request,通过网上查找,解决了此问题:https://blog.csdn.net/qq_32618327/article/details/104199258
(2)再次运行命令:roslaunch mrobot_gazebo view_mrobot_gazebo.launch ,出现Gazebo黑屏,但是不报错的问题。通过网上查找,可能是因为缺少模型导致的,但是我并不确定是否就是我现在面对的问题:https://blog.csdn.net/chenguangbiao/article/details/120199728
想请教下老师该怎么解决这个问题,如果是缺少模型导致的,我该去哪下载相关模型?
学习了3.7.1 乌龟例程中的服务,动手敲一遍代码,发现书中以下代码无法运行:
rosservice call /spawn "x:8.0 y:8.0 theta:0.0 name:'turtle2'"
提示格式错误
Incompatible arguments to call service:
Not enough arguments:
* Given: ["x:8.0 y:8.0 theta:0.0 name:'turtle2'"]
* Expected: ['x', 'y', 'theta', 'name']
Provided arguments are:
* x:8.0 y:8.0 theta:0.0 name:'turtle2' (type str)
我使用了严格的json格式,成功:
rosservice call /spawn "{'x':8.0,'y':8.0,'theta':0.0,'name':'turtle2'}"
希望对大家有帮助。
贴上我的ROS版本(roscore):1.12.17
胡老师您好,我在本书第10.12.4章节中,运行Moveit和Gazebo的launch文件
$ roslaunch marm_gazebo arm_bringup_moveit.launch 时出现了问题,想请教您一下?
运行时gazebo和rviz都能正常启动,使用moveit进行规划时,只有rviz中的机械臂可以运动,gazebo中的机械臂不能一起运动,出现下面的错误是什么原因呢?
[ERROR] [1543648302.946867035, 54.954000000]: Unable to identify any set of controllers that can actuate the specified joints: [ joint1 joint2 joint3 joint4 joint5 joint6 ]
[ERROR] [1543648302.946922001, 54.954000000]: Known controllers and their joints:
[ERROR] [1543648302.946988980, 54.954000000]: Apparently trajectory initialization failed
Hi ,I run the code of mrobot_navigation, when I give the 2D Nav Goal, robot won't move as the green path,instead, it moves irregular, and it seems that it won't arrive the goal, so I am wanderring why? Is it normal?
Thank you
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.